Merge branch 'master' into feature/context-menu

This commit is contained in:
Aaron Riedel 2022-03-06 11:40:13 +01:00
commit 02794ec873
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -3,6 +3,8 @@ stages: # List of stages for jobs, and their order of execution
- test - test
- deploy - deploy
image: debian
docker-build: docker-build:
# Use the official docker image. # Use the official docker image.
image: docker:latest image: docker:latest
@ -24,10 +26,24 @@ docker-build:
fi fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}" - docker push "$CI_REGISTRY_IMAGE${tag}"
# Run this job in a branch where a Dockerfile exists only:
rules: - master
- if: $CI_COMMIT_BRANCH - dev
exists:
- Dockerfile before_script:
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "dev" - apt-get update -qq
when: always - apt-get install -qq git
# 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:
type: deploy
script:
- ssh $SSH_SERVER "cd /root && docker-compose up -d bot && exit"
only:
- master