summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-09 13:40:23 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-09 13:45:41 +1300
commitf44b7ac6b7b241df9b3beaf8386877852efb015b (patch)
tree7c19a6af4092b2605ded7ff1fa0b4f68ebb7d650
parentab61bee378ed45ff01d74742b54149533811a204 (diff)
downloadgitlab-ce-f44b7ac6b7b241df9b3beaf8386877852efb015b.tar.gz
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
-rw-r--r--changelogs/unreleased/auto_devops_kubernetes_active.yml5
-rw-r--r--lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml30
2 files changed, 25 insertions, 10 deletions
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"