Update .gitlab-ci.yml file
This commit is contained in:
parent
f76de1849d
commit
6c7aeafecf
1 changed files with 7 additions and 12 deletions
|
@ -43,26 +43,21 @@ docker-build:
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- template: Security/Container-Scanning.gitlab-ci.yml
|
- template: Security/Container-Scanning.gitlab-ci.yml
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
|
||||||
container_scanning:
|
container_scanning:
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE${tag}"
|
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE${tag}"
|
||||||
stage: test
|
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:
|
deploy_staging:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
image: debian
|
||||||
script:
|
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"
|
- ssh $SSH_SERVER "cd /root && docker-compose pull shbot && docker-compose up -d shbot && exit"
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
Loading…
Reference in a new issue