feat: rollout deployments using argocd
This commit is contained in:
parent
1513812549
commit
7261929a16
1 changed files with 9 additions and 19 deletions
|
|
@ -4,30 +4,20 @@
|
||||||
deployment:
|
deployment:
|
||||||
stage: "deployment"
|
stage: "deployment"
|
||||||
image:
|
image:
|
||||||
name: "registry.gitlab.simoncor.net/oci/ssh-client:v25.06.03"
|
name: "quay.io/argoproj/argocd:v3.2.5"
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
entrypoint: [""]
|
||||||
rules:
|
rules:
|
||||||
|
|
||||||
# run only on push to default branch
|
# run only on push to default branch
|
||||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
- when: "never"
|
- when: "never"
|
||||||
|
|
||||||
# prepare ssh
|
|
||||||
before_script:
|
|
||||||
|
|
||||||
# prepare ssh
|
|
||||||
- |
|
|
||||||
# prepare ssh
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
chmod 700 ~/.ssh
|
|
||||||
echo "$SSH_CONFIG" > ~/.ssh/config
|
|
||||||
echo "$SSH_DEPLOYMENT_KEY" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
|
|
||||||
# deployment commands
|
|
||||||
script:
|
script:
|
||||||
|
|
||||||
- |
|
# execute a rollout restart using argocd
|
||||||
# rollout deployment
|
- "argocd app actions run docs-simoncor-net restart \
|
||||||
ssh "$SSH_DEPLOYMENT_USER@mgmt01.siempie.internal" "sudo -u simon \
|
--kind Deployment \
|
||||||
kubectl rollout restart --namespace=docs-simoncor-net deployment docs-simoncor-net"
|
--resource-name docs-simoncor-net \
|
||||||
|
--server $ARGOCD_SERVER \
|
||||||
|
--auth-token $ARGOCD_AUTH_TOKEN \
|
||||||
|
--grpc-web"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue