Commit 9186f786 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch '351239-deploy-latest-gitlab-ci-yml-does-not-read-kube_context' into 'master'

Resolve "Deploy.latest.gitlab-ci.yml does not read KUBE_CONTEXT"

See merge request gitlab-org/gitlab!79240
parents 2d40ffd2 48663c8f
variables:
AUTO_DEPLOY_IMAGE_VERSION: 'v2.18.1'
.auto-deploy: .auto-deploy:
image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v2.6.0" image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}"
dependencies: [] dependencies: []
review: review:
...@@ -8,6 +11,7 @@ review: ...@@ -8,6 +11,7 @@ review:
script: script:
- auto-deploy check_kube_domain - auto-deploy check_kube_domain
- auto-deploy download_chart - auto-deploy download_chart
- auto-deploy use_kube_context
- auto-deploy ensure_namespace - auto-deploy ensure_namespace
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy create_secret - auto-deploy create_secret
...@@ -35,6 +39,7 @@ stop_review: ...@@ -35,6 +39,7 @@ stop_review:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
- auto-deploy use_kube_context
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy delete - auto-deploy delete
environment: environment:
...@@ -63,6 +68,7 @@ staging: ...@@ -63,6 +68,7 @@ staging:
script: script:
- auto-deploy check_kube_domain - auto-deploy check_kube_domain
- auto-deploy download_chart - auto-deploy download_chart
- auto-deploy use_kube_context
- auto-deploy ensure_namespace - auto-deploy ensure_namespace
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy create_secret - auto-deploy create_secret
...@@ -88,6 +94,7 @@ canary: ...@@ -88,6 +94,7 @@ canary:
script: script:
- auto-deploy check_kube_domain - auto-deploy check_kube_domain
- auto-deploy download_chart - auto-deploy download_chart
- auto-deploy use_kube_context
- auto-deploy ensure_namespace - auto-deploy ensure_namespace
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy create_secret - auto-deploy create_secret
...@@ -96,6 +103,8 @@ canary: ...@@ -96,6 +103,8 @@ canary:
name: production name: production
url: http://$CI_PROJECT_PATH_SLUG.$KUBE_INGRESS_BASE_DOMAIN url: http://$CI_PROJECT_PATH_SLUG.$KUBE_INGRESS_BASE_DOMAIN
rules: rules:
- if: '$CI_DEPLOY_FREEZE != null'
when: never
- if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")' - if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")'
when: never when: never
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
...@@ -109,6 +118,7 @@ canary: ...@@ -109,6 +118,7 @@ canary:
script: script:
- auto-deploy check_kube_domain - auto-deploy check_kube_domain
- auto-deploy download_chart - auto-deploy download_chart
- auto-deploy use_kube_context
- auto-deploy ensure_namespace - auto-deploy ensure_namespace
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy create_secret - auto-deploy create_secret
...@@ -125,6 +135,8 @@ canary: ...@@ -125,6 +135,8 @@ canary:
production: production:
<<: *production_template <<: *production_template
rules: rules:
- if: '$CI_DEPLOY_FREEZE != null'
when: never
- if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")' - if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")'
when: never when: never
- if: '$STAGING_ENABLED' - if: '$STAGING_ENABLED'
...@@ -141,6 +153,8 @@ production_manual: ...@@ -141,6 +153,8 @@ production_manual:
<<: *production_template <<: *production_template
allow_failure: false allow_failure: false
rules: rules:
- if: '$CI_DEPLOY_FREEZE != null'
when: never
- if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")' - if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")'
when: never when: never
- if: '$INCREMENTAL_ROLLOUT_ENABLED' - if: '$INCREMENTAL_ROLLOUT_ENABLED'
...@@ -159,6 +173,7 @@ production_manual: ...@@ -159,6 +173,7 @@ production_manual:
script: script:
- auto-deploy check_kube_domain - auto-deploy check_kube_domain
- auto-deploy download_chart - auto-deploy download_chart
- auto-deploy use_kube_context
- auto-deploy ensure_namespace - auto-deploy ensure_namespace
- auto-deploy initialize_tiller - auto-deploy initialize_tiller
- auto-deploy create_secret - auto-deploy create_secret
...@@ -177,6 +192,8 @@ production_manual: ...@@ -177,6 +192,8 @@ production_manual:
resource_group: production resource_group: production
allow_failure: true allow_failure: true
rules: rules:
- if: '$CI_DEPLOY_FREEZE != null'
when: never
- if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")' - if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")'
when: never when: never
- if: '$INCREMENTAL_ROLLOUT_MODE == "timed"' - if: '$INCREMENTAL_ROLLOUT_MODE == "timed"'
...@@ -190,6 +207,8 @@ production_manual: ...@@ -190,6 +207,8 @@ production_manual:
.timed_rollout_template: &timed_rollout_template .timed_rollout_template: &timed_rollout_template
<<: *rollout_template <<: *rollout_template
rules: rules:
- if: '$CI_DEPLOY_FREEZE != null'
when: never
- if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")' - if: '($CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == "") && ($KUBECONFIG == null || $KUBECONFIG == "")'
when: never when: never
- if: '$INCREMENTAL_ROLLOUT_MODE == "manual"' - if: '$INCREMENTAL_ROLLOUT_MODE == "manual"'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment