hubl/.gitlab-ci.yml

166 lines
3.9 KiB
YAML
Raw Normal View History

image: node:11
stages:
- integration
- acceptance
- deployment
## TESTING ##
## VALIDATION ##
2020-03-19 12:44:10 +00:00
test1:
stage: integration
environment:
name: test1
url: https://test1.startinblox.com
script:
- echo "$APP_CONFIG_TEST1" > config.json
2020-03-19 12:15:49 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test1@astral.startinblox.com:~/front/
only:
2020-03-16 09:50:07 +00:00
- /^feature\/.*/
when: manual
tags:
- deploy
2020-03-19 12:44:10 +00:00
test2:
stage: integration
environment:
name: test2
url: https://test2.startinblox.com
script:
- echo "$APP_CONFIG_TEST2" > config.json
2020-03-19 12:15:49 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test2@astral.startinblox.com:~/front/
only:
2020-03-16 09:51:57 +00:00
- /^feature\/.*/
when: manual
tags:
- deploy
2020-03-19 12:44:10 +00:00
test3:
stage: integration
environment:
name: test3
url: https://test3.startinblox.com
script:
- echo "$APP_CONFIG_TEST3" > config.json
2020-03-19 12:15:49 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test3@astral.startinblox.com:~/front/
only:
2020-03-16 09:51:57 +00:00
- /^feature\/.*/
when: manual
tags:
- deploy
2020-03-19 12:44:10 +00:00
stg1:
stage: acceptance
environment:
name: stg1
url: https://stg1.startinblox.com
script:
- echo "$APP_CONFIG_STG1" > config.json
2020-03-19 12:15:49 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg1@astral.startinblox.com:~/front/
only:
- /^release\/.*/
when: manual
tags:
- deploy
2020-03-19 12:44:10 +00:00
stg2:
stage: acceptance
environment:
name: stg2
url: https://stg2.startinblox.com
script:
- echo "$APP_CONFIG_STG2" > config.json
2020-03-19 12:15:49 +00:00
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg2@astral.startinblox.com:~/front/
only:
- /^release\/.*/
when: manual
tags:
- deploy
## LIVE DEPLOYMENTS ##
2020-03-19 12:44:10 +00:00
alpha:
stage: deployment
environment:
name: paris
url: https://alpha.happy-dev.fr
script:
- echo "$APP_CONFIG_ALPHA" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* alpha@ssh-alpha.happy-dev.fr:~/www/
2020-03-19 12:44:10 +00:00
only:
- master
when: manual
tags:
- deploy
nantes:
stage: deployment
environment:
name: nantes
2020-03-19 12:44:10 +00:00
url: https://app.nantes.happy-dev.fr
script:
2020-03-19 12:15:49 +00:00
- echo "$APP_CONFIG_NANTESHD" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* nantes@ssh-nantes.happy-dev.fr:~/sib/www/
only:
- master
when: manual
tags:
- deploy
2020-03-19 12:44:10 +00:00
paris:
stage: deployment
environment:
name: paris
2020-03-19 12:44:10 +00:00
url: https://app.paris.happy-dev.fr
script:
- echo "$APP_CONFIG_PARIS" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* paris@ssh-paris.happy-dev.fr:~/sib/www/
only:
- master
when: manual
tags:
- deploy
toulouse:
stage: deployment
environment:
name: toulouse
url: https://smart-toulouse.happy-dev.fr
script:
2020-03-19 12:44:10 +00:00
- echo "$APP_CONFIG_TOULOUSE" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* smart-toulouse@ssh-smart-toulouse.happy-dev.fr:~/www/
only:
- master
when: manual
tags:
- deploy