From 6c7aeafecf6f794df541c573789ec268f66aff69 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Wed, 9 Mar 2022 07:00:44 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5cf013a..941353f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,26 +43,21 @@ docker-build: include: - template: Security/Container-Scanning.gitlab-ci.yml - - template: Security/SAST.gitlab-ci.yml container_scanning: variables: DOCKER_IMAGE: "$CI_REGISTRY_IMAGE${tag}" stage: test - - -image: debian -before_script: - - apt-get update -qq - # Setup SSH deploy keys - - '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' deploy_staging: stage: deploy + image: debian 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' - ssh $SSH_SERVER "cd /root && docker-compose pull shbot && docker-compose up -d shbot && exit" only: - master