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