From 46e75415d4b8f302e6c1bef7353490312de121b9 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Wed, 9 Mar 2022 07:16:27 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 941353f..43988a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,7 @@ docker-build-push: fi - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - docker push "$CI_REGISTRY_IMAGE${tag}" + allow_failure: false only: - master - dev @@ -37,6 +38,7 @@ docker-build: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - docker build --pull -t "$CI_REGISTRY_IMAGE" . + allow_failure: false except: - master - dev @@ -47,17 +49,19 @@ container_scanning: variables: DOCKER_IMAGE: "$CI_REGISTRY_IMAGE${tag}" stage: test + allow_failure: false deploy_staging: stage: deploy image: debian - script: + 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