Skip to content
Snippets Groups Projects

pre-deploy to acceptance

Merged Nico Vermaas requested to merge master into acceptance
13 files
+ 161
126
Compare changes
  • Side-by-side
  • Inline
Files
13
+ 28
7
@@ -16,6 +16,7 @@ docker-build-master:
only:
- master
- acceptance
- release
docker-build-branch:
# Official docker image.
@@ -30,10 +31,10 @@ docker-build-branch:
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
- acceptance
- release
# this deploys the 'esap-gateway-query' branch (a dev/test branch) as 'vermaas'
# by running /docker_compose/esap-api-gateway/docker-compose-query-cd.yml
# deploy test/dev version on 'sdc-dev.astron.nl'
docker-deploy-master:
image: docker:latest
stage: deploy
@@ -43,15 +44,16 @@ docker-deploy-master:
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan sdc.astron.nl >> ~/.ssh/known_hosts
- ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no vermaas@sdc.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no vermaas@sdc.astron.nl "docker-compose -p atdb -f /docker_compose/atdb-ldv/docker-compose-cd.yml up -d"
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p atdb -f /docker_compose/atdb-ldv/docker-compose-dev-cd.yml up -d"
when: manual
only:
- master
# deploy acceptance version on 'dop457.astron.nl'
docker-deploy-acceptance:
image: docker:latest
stage: deploy
@@ -68,4 +70,23 @@ docker-deploy-acceptance:
- ssh -o StrictHostKeyChecking=no vermaas@dop457.astron.nl "docker-compose -p atdb -f /data/docker_compose/docker-compose-atdb-ldv-acc-cd.yml up -d"
when: manual
only:
- acceptance
\ No newline at end of file
- acceptance
# deploy release version on 'sdc.astron.nl'
docker-deploy-release:
image: docker:latest
stage: deploy
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dop821.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no sdco@dop821.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no sdco@dop821.astron.nl "docker-compose -p atdb -f /opt/dockercompose/atdb-ldv-compose/docker-compose-production-cd.yml up -d"
when: manual
only:
- release
\ No newline at end of file
Loading