From f44b7ac6b7b241df9b3beaf8386877852efb015b Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Fri, 9 Nov 2018 13:40:23 +1300 Subject: Switch kubernetes:active with checking $KUBECONFIG We have found an issue with `kubernetes:active` where it doesn't work with multiple clusters. Switch with the similar $KUBECONFIG variable check but this check actually gets the variable from the cluster matching the environment name. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/8311 --- .../unreleased/auto_devops_kubernetes_active.yml | 5 ++++ lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml | 30 ++++++++++++++-------- 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 changelogs/unreleased/auto_devops_kubernetes_active.yml diff --git a/changelogs/unreleased/auto_devops_kubernetes_active.yml b/changelogs/unreleased/auto_devops_kubernetes_active.yml new file mode 100644 index 00000000000..310d37128c9 --- /dev/null +++ b/changelogs/unreleased/auto_devops_kubernetes_active.yml @@ -0,0 +1,5 @@ +--- +title: Switch kubernetes:active with checking in Auto-DevOps.gitlab-ci.yml +merge_request: 22929 +author: +type: fixed diff --git a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml index c759bb7098e..1e26d0a2d6a 100644 --- a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @@ -147,7 +147,8 @@ performance: only: refs: - branches - kubernetes: active + variables: + - $KUBECONFIG except: variables: - $PERFORMANCE_DISABLED @@ -225,7 +226,8 @@ dast: only: refs: - branches - kubernetes: active + variables: + - $KUBECONFIG variables: - $GITLAB_FEATURES =~ /\bdast\b/ except: @@ -254,7 +256,8 @@ review: only: refs: - branches - kubernetes: active + variables: + - $KUBECONFIG except: refs: - master @@ -277,7 +280,8 @@ stop_review: only: refs: - branches - kubernetes: active + variables: + - $KUBECONFIG except: refs: - master @@ -306,7 +310,8 @@ staging: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG variables: - $STAGING_ENABLED @@ -331,7 +336,8 @@ canary: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG variables: - $CANARY_ENABLED @@ -359,7 +365,8 @@ production: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG except: variables: - $STAGING_ENABLED @@ -374,7 +381,8 @@ production_manual: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG variables: - $STAGING_ENABLED - $CANARY_ENABLED @@ -411,7 +419,8 @@ production_manual: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG variables: - $INCREMENTAL_ROLLOUT_MODE == "manual" - $INCREMENTAL_ROLLOUT_ENABLED @@ -426,7 +435,8 @@ production_manual: only: refs: - master - kubernetes: active + variables: + - $KUBECONFIG variables: - $INCREMENTAL_ROLLOUT_MODE == "timed" -- cgit v1.2.1