ci: Disable deploy stage to swarm, not used now

parent dc2af624
Pipeline #1121 passed with stages
in 31 seconds
......@@ -3,7 +3,7 @@ image: docker:dind
stages:
- build
- release
- deploy
variables:
CONTAINER_BUILD_IMAGE: docker.fricouv.eu/vfricou/glpi:$CI_COMMIT_REF_NAME
......@@ -33,16 +33,16 @@ release-image:tags:
only:
- tags
deploy:swarm:
stage: deploy
image: debian:latest
script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- mkdir -p ~/.ssh
- echo "${CI_SWARM_DEPLOY_SSHKEY}" > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- ssh -i ~/.ssh/id_rsa ${CI_SWARM_DEPLOY_USER}@${CI_SWARM_DEPLOY_MANAGER} "docker service update ${SWARM_SVC_NAME} --replicas 2 && docker service update ${SWARM_SVC_NAME} --image ${CONTAINER_RELEASE_IMAGE} --with-registry-auth --force && docker service update ${SWARM_SVC_NAME} --replicas 1"
only:
- master
\ No newline at end of file
#deploy:swarm:
# stage: deploy
# image: debian:latest
# script:
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# - mkdir -p ~/.ssh
# - echo "${CI_SWARM_DEPLOY_SSHKEY}" > ~/.ssh/id_rsa
# - chmod 400 ~/.ssh/id_rsa
# - chmod 700 ~/.ssh
# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# - ssh -i ~/.ssh/id_rsa ${CI_SWARM_DEPLOY_USER}@${CI_SWARM_DEPLOY_MANAGER} "docker service update ${SWARM_SVC_NAME} --replicas 2 && docker service update ${SWARM_SVC_NAME} --image ${CONTAINER_RELEASE_IMAGE} --with-registry-auth --force && docker service update ${SWARM_SVC_NAME} --replicas 1"
# only:
# - master
\ No newline at end of file
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