Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1b3c6e0e
Commit
1b3c6e0e
authored
Jan 17, 2019
by
walkafwalka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force Auto DevOps redeployment when application secrets are updated
parent
b9494bf3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
changelogs/unreleased/force-redeploy-on-updated-secrets.yml
changelogs/unreleased/force-redeploy-on-updated-secrets.yml
+5
-0
lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+8
-0
No files found.
changelogs/unreleased/force-redeploy-on-updated-secrets.yml
0 → 100644
View file @
1b3c6e0e
---
title
:
Redeploy Auto DevOps deployment on variable updates
merge_request
:
24498
author
:
walkafwalka
type
:
added
lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
View file @
1b3c6e0e
...
@@ -621,6 +621,12 @@ rollout 100%:
...
@@ -621,6 +621,12 @@ rollout 100%:
--from-env-file <(k8s_prefixed_variables) -o yaml --dry-run |
--from-env-file <(k8s_prefixed_variables) -o yaml --dry-run |
kubectl replace -n "$KUBE_NAMESPACE" --force -f -
kubectl replace -n "$KUBE_NAMESPACE" --force -f -
'
'
function k8s_prefixed_variables() {
env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p"
}
APPLICATION_SECRET_CHECKSUM=$(k8s_prefixed_variables | sha256sum | cut -d ' ' -f 1)
}
}
function deploy_name() {
function deploy_name() {
...
@@ -688,6 +694,7 @@ rollout 100%:
...
@@ -688,6 +694,7 @@ rollout 100%:
--set application.track="$track" \
--set application.track="$track" \
--set application.database_url="$DATABASE_URL" \
--set application.database_url="$DATABASE_URL" \
--set application.secretName="$APPLICATION_SECRET_NAME" \
--set application.secretName="$APPLICATION_SECRET_NAME" \
--set application.secretChecksum="$APPLICATION_SECRET_CHECKSUM" \
--set service.url="$CI_ENVIRONMENT_URL" \
--set service.url="$CI_ENVIRONMENT_URL" \
--set service.additionalHosts="$additional_hosts" \
--set service.additionalHosts="$additional_hosts" \
--set replicaCount="$replicas" \
--set replicaCount="$replicas" \
...
@@ -722,6 +729,7 @@ rollout 100%:
...
@@ -722,6 +729,7 @@ rollout 100%:
--set application.track="$track" \
--set application.track="$track" \
--set application.database_url="$DATABASE_URL" \
--set application.database_url="$DATABASE_URL" \
--set application.secretName="$APPLICATION_SECRET_NAME" \
--set application.secretName="$APPLICATION_SECRET_NAME" \
--set application.secretChecksum="$APPLICATION_SECRET_CHECKSUM" \
--set service.url="$CI_ENVIRONMENT_URL" \
--set service.url="$CI_ENVIRONMENT_URL" \
--set service.additionalHosts="$additional_hosts" \
--set service.additionalHosts="$additional_hosts" \
--set replicaCount="$replicas" \
--set replicaCount="$replicas" \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment