Application should be accessible at
http://steamru-fnm-test-piankov.34.70.159.229.nip.io
Waiting for deployment “production-rollout” rollout to finish: 0 of 1 updated replicas are available…
Running after_script
00:00
WARNING: Failed to inspect build container 761971b6a52180fd5ec5793268f2d48a0766c629687c49aad7fa6c7ee13e4b3c context deadline exceeded (docker_command.go:77:0s)
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.13.0 …
Uploading artifacts for failed job
00:00
Pulling docker image gitlab/gitlab-runner-helper:x86_64-6c8c540f …
ERROR: Job failed: execution took longer than 1h0m0s seconds
and here is my gitlab-ci.yaml:
image: alpine:latest
variables:
ROLLOUT_RESOURCE_TYPE: deployment
POSTGRES_ENABLED: “false”
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: “”
TRACE: set -x
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
.auto-deploy:
image: “registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.13.0”
review:
extends: .auto-deploy
stage: deploy
script:
- auto-deploy download_chart
- auto-deploy ensure_namespace
- auto-deploy initialize_tiller
- auto-deploy create_secret
#- sed ‘s/dockercfg/dockerconfigjson/g’
#- sed ‘s/dockercfg/dockerconfigjson/g’ | kubectl replace -n “$KUBE_NAMESPACE” --force -f -
- auto-deploy deploy
- auto-deploy persist_environment_url
environment:
name: review/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_ID-$CI_ENVIRONMENT_SLUG
on_stop: stop_review
artifacts:
paths: [environment_url.txt]
only:
refs:
- branches
- tags
kubernetes: active
except:
refs:
- master
variables:
- $REVIEW_DISABLED
stop_review:
extends: .auto-deploy
stage: .pre
variables:
GIT_STRATEGY: none
script:
- auto-deploy initialize_tiller
- auto-deploy delete
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
dependencies:
when: manual
allow_failure: true
only:
refs:
- branches
- tags
kubernetes: active
except:
refs:
- master
variables:
- $REVIEW_DISABLED
Staging deploys are disabled by default since
continuous deployment to production is enabled by default
If you prefer to automatically deploy to staging and
only manually promote to production, enable this job by setting
STAGING_ENABLED.
staging:
extends: .auto-deploy
stage: deploy
script:
- auto-deploy download_chart
- auto-deploy ensure_namespace
- auto-deploy initialize_tiller
- auto-deploy create_secret
#- sed ‘s/dockercfg/dockerconfigjson/g’
#- sed ‘s/dockercfg/dockerconfigjson/g’ | kubectl replace -n “$KUBE_NAMESPACE” --force -f -
- auto-deploy deploy
environment:
name: staging
url: http://$CI_PROJECT_PATH_SLUG-staging
only:
refs:
- master
kubernetes: active
variables:
- $STAGING_ENABLED
production: &production_template
extends: .auto-deploy
stage: deploy
script:
- auto-deploy download_chart
- auto-deploy ensure_namespace
- auto-deploy initialize_tiller
- auto-deploy create_secret
#- sed ‘s/dockercfg/dockerconfigjson/g’
#- sed ‘s/dockercfg/dockerconfigjson/g’ | kubectl replace -n “$KUBE_NAMESPACE” --force -f -
- auto-deploy deploy
- auto-deploy delete canary
- auto-deploy delete rollout
- auto-deploy persist_environment_url
environment:
name: production
url: http://$CI_PROJECT_PATH_SLUG
artifacts:
paths: [environment_url.txt]
production:
<<: *production_template
only:
refs:
- master
kubernetes: active
except:
variables:
- $STAGING_ENABLED
- $INCREMENTAL_ROLLOUT_ENABLED
- $INCREMENTAL_ROLLOUT_MODE
production_manual:
<<: *production_template
when: manual
allow_failure: false
only:
refs:
- master
kubernetes: active
variables:
- $STAGING_ENABLED
except:
variables:
- $INCREMENTAL_ROLLOUT_ENABLED
- $INCREMENTAL_ROLLOUT_MODE
This job implements incremental rollout on for every push to master
.
rollout: &rollout_template
extends: .auto-deploy
script:
- auto-deploy download_chart
- auto-deploy ensure_namespace
- auto-deploy initialize_tiller
- auto-deploy create_secret
#- sed ‘s/dockercfg/dockerconfigjson/g’
#- sed ‘s/dockercfg/dockerconfigjson/g’ | kubectl replace -n “$KUBE_NAMESPACE” --force -f -
- auto-deploy deploy rollout ROLLOUT_PERCENTAGE
- auto-deploy scale stable ((100-ROLLOUT_PERCENTAGE))
- auto-deploy persist_environment_url
environment:
name: production
#url: http://$CI_PROJECT_PATH_SLUG
#url: http://34.71.115.159
url: http://$CI_PROJECT_PATH_SLUG.$KUBE_INGRESS_BASE_DOMAIN
artifacts:
paths: [environment_url.txt]
.manual_rollout_template: &manual_rollout_template
<<: *rollout_template
stage: production
when: manual
This selectors are backward compatible mode with $INCREMENTAL_ROLLOUT_ENABLED (before 11.4)
only:
refs:
- master
kubernetes: active
variables:
- $INCREMENTAL_ROLLOUT_MODE == “manual”
- $INCREMENTAL_ROLLOUT_ENABLED
except:
variables:
- $INCREMENTAL_ROLLOUT_MODE == “timed”
.timed_rollout_template: &timed_rollout_template
<<: *rollout_template
when: delayed
start_in: 5 minutes
only:
refs:
- master
kubernetes: active
variables:
- $INCREMENTAL_ROLLOUT_MODE == “timed”
timed rollout 10%:
<<: *timed_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 10
timed rollout 25%:
<<: *timed_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 25
timed rollout 50%:
<<: *timed_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 50
timed rollout 100%:
<<: *timed_rollout_template
<<: *production_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 100
rollout 10%:
<<: *manual_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 10
rollout 25%:
<<: *manual_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 25
rollout 50%:
<<: *manual_rollout_template
stage: deploy
variables:
ROLLOUT_PERCENTAGE: 50
rollout 100%:
<<: *manual_rollout_template
<<: *production_template
allow_failure: false