parent
b8bb1f8f75
commit
addab8bf41
1 changed files with 49 additions and 0 deletions
@ -0,0 +1,49 @@ |
||||
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 deploy --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 |
||||
Loading…
Reference in new issue