From 9bac3c953a9b08ec3c83cd8ecdb1907d345aa770 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 21 Jun 2022 20:47:04 +0200 Subject: [PATCH] reenable cicd --- .gitlab-ci.yml | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0634399..93171ee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,34 +58,34 @@ container_scanning: stage: test allow_failure: false -#deploy_dev: -# stage: deploy -# image: debian -# before_script: -# - apt-get update -qq -# - 'which ssh-agent || ( apt-get install -qq openssh-client )' -# - eval $(ssh-agent -s) -# - ssh-add <(echo "$SSH_PRIVATE_KEY") -# - mkdir -p ~/.ssh -# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' -# script: -# - ssh $SSH_SERVER "cd /root && docker-compose -f shbot-dev.yaml pull shbot-dev && docker-compose -f shbot-dev.yaml up -d shbot-dev && exit" -# only: -# - dev -# - merge_requests -# -#deploy_staging: -# stage: deploy -# image: debian -# before_script: -# - apt-get update -qq -# - 'which ssh-agent || ( apt-get install -qq openssh-client )' -# - eval $(ssh-agent -s) -# - ssh-add <(echo "$SSH_PRIVATE_KEY") -# - mkdir -p ~/.ssh -# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' -# script: -# - ssh $SSH_SERVER "cd /root && docker-compose pull shbot && docker-compose up -d shbot && exit" -# only: -# - master +deploy_dev: + stage: deploy + image: debian + before_script: + - apt-get update -qq + - 'which ssh-agent || ( apt-get install -qq openssh-client )' + - eval $(ssh-agent -s) + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + script: + - ssh $SSH_SERVER "cd /root && docker-compose -f shbot-dev.yaml pull shbot-dev && docker-compose -f shbot-dev.yaml up -d shbot-dev && exit" + only: + - dev + - merge_requests + +deploy_staging: + stage: deploy + image: debian + before_script: + - apt-get update -qq + - 'which ssh-agent || ( apt-get install -qq openssh-client )' + - eval $(ssh-agent -s) + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + script: + - ssh $SSH_SERVER "cd /root && docker-compose pull shbot && docker-compose up -d shbot && exit" + only: + - master \ No newline at end of file