Skip to content
Snippets Groups Projects
Commit 21238400 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

fix type in new ci/cd pipeline

parent 634e7662
No related branches found
No related tags found
1 merge request!261updating ci/cd pipeline with stages and do it as user 'sdc' instead of 'vermaas'
Pipeline #37879 passed
...@@ -17,7 +17,6 @@ docker-build-master: ...@@ -17,7 +17,6 @@ docker-build-master:
- docker push "$CI_REGISTRY_IMAGE" - docker push "$CI_REGISTRY_IMAGE"
only: only:
- master - master
- acceptance
- release - release
docker-build-branch: docker-build-branch:
...@@ -33,7 +32,6 @@ docker-build-branch: ...@@ -33,7 +32,6 @@ docker-build-branch:
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except: except:
- master - master
- acceptance
- release - release
# deploy test/dev version on 'sdc-dev.astron.nl' # deploy test/dev version on 'sdc-dev.astron.nl'
...@@ -55,26 +53,6 @@ docker-deploy-master: ...@@ -55,26 +53,6 @@ docker-deploy-master:
only: only:
- master - master
# deploy acceptance version on 'dop457.astron.nl'
docker-deploy-acceptance:
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 dop457.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no vermaas@dop457.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- 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
# deploy release version on 'sdc.astron.nl' # deploy release version on 'sdc.astron.nl'
docker-deploy-release: docker-deploy-release:
image: docker:latest image: docker:latest
...@@ -99,7 +77,7 @@ docker-deploy-release: ...@@ -99,7 +77,7 @@ docker-deploy-release:
# deploy master branch to 'sdc-dev.astron.nl' # deploy master branch to 'sdc-dev.astron.nl'
docker-deploy-to-test: docker-deploy-to-test:
image: docker:latest image: docker:latest
stage: deploy-to-test stage: deploy_to_test
before_script: before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
...@@ -118,7 +96,7 @@ docker-deploy-to-test: ...@@ -118,7 +96,7 @@ docker-deploy-to-test:
# deploy master branch to 'sdc.astron.nl' # deploy master branch to 'sdc.astron.nl'
docker-deploy-to-production: docker-deploy-to-production:
image: docker:latest image: docker:latest
stage: deploy-to-production stage: deploy_to_production
before_script: before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
...@@ -133,4 +111,4 @@ docker-deploy-to-production: ...@@ -133,4 +111,4 @@ docker-deploy-to-production:
- 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" - 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 when: manual
only: only:
- release - master
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment