You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.3 KiB

variables:
SERVER_URL: "go.skillbox.ru"
DOMAIN: "$CI_BUILD_REF_SLUG.$SERVER_URL"
GIT_DEPTH: "1"
types:
- deploy_branch
- deploy_production
deploy_branch:
stage: deploy_branch
script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 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'
- ~/.composer/vendor/bin/envoy run deploydev --cleanup --branch="$CI_BUILD_REF_SLUG"
environment:
name: production
url: https://go.skillbox.ru
variables:
GIT_DEPTH: "1"
# when: manual
only:
- dev
- autodeploy
deploy_production:
stage: deploy_production
script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 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'
- ~/.composer/vendor/bin/envoy run deploy --cleanup --branch="$CI_BUILD_REF_SLUG"
environment:
name: production
url: https://go.skillbox.ru
variables:
GIT_DEPTH: "1"
when: manual
only:
- master