Ajout 736 CI/CD

This commit is contained in:
Mathieu Lagace
2019-08-04 19:10:08 -04:00
parent 818a84c3df
commit fd73dc388d
2 changed files with 81 additions and 25 deletions

View File

@@ -11,7 +11,8 @@ variables:
stages:
- test
- deploy
- deploy_697
- deploy_736
unit_test:
stage: test
@@ -21,7 +22,7 @@ unit_test:
- php artisan key:generate
deploy_production:
stage: deploy
stage: deploy_697
script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
@@ -29,10 +30,25 @@ deploy_production:
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA"
- ~/.composer/vendor/bin/envoy run deploy_697 --commit="$CI_COMMIT_SHA"
environment:
name: production
url: http://dev.exvps.ca
when: manual
name: 697
url: http://escadron697.ca
only:
- master
deploy_production:
stage: deploy_736
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_736 --commit="$CI_COMMIT_SHA"
environment:
name: 697
url: http://736.exvps.ca
only:
- master