From 425c9b050086ba1e97b0be0bd4e1a80d24d907c4 Mon Sep 17 00:00:00 2001 From: vermaas <vermaas@astron.nl> Date: Thu, 20 Oct 2022 13:44:16 +0200 Subject: [PATCH] remove old stages --- .gitlab-ci.yml | 76 ++------------------------------------------------ 1 file changed, 2 insertions(+), 74 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1dc728e..480251b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,81 +19,9 @@ docker-build: # - master # - release -docker-build-branch: -# Official docker image. - image: docker:latest - stage: build - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - docker build --pull -t "$CI_REGISTRY_IMAGE" atdb - - docker push "$CI_REGISTRY_IMAGE" - except: - - master - - release - -# deploy test/dev version on 'sdc-dev.astron.nl' -docker-deploy-master: - 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 dop814.astron.nl >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - script: - - 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 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 "echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY" - - 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 - -# deploy branch to 'sdc-dev.astron.nl' -docker-deploy-branch-to-test: - image: docker:latest - stage: deploy_to_test - 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 dop814.astron.nl >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - script: - - 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 - except: - - master -# deploy master branch to 'sdc-dev.astron.nl' -docker-deploy-master-to-test: +# deploy master or branch to 'sdc-dev.astron.nl' +docker-deploy-to-test: image: docker:latest stage: deploy_to_test before_script: -- GitLab