2020-03-15 16:11:16 +00:00
|
|
|
image: node:11
|
2020-01-14 20:36:26 +00:00
|
|
|
|
|
|
|
stages:
|
2020-03-15 16:11:16 +00:00
|
|
|
- integration
|
|
|
|
- acceptance
|
|
|
|
- deployment
|
2020-01-14 20:36:26 +00:00
|
|
|
|
|
|
|
## TESTING ##
|
|
|
|
|
|
|
|
## VALIDATION ##
|
|
|
|
|
2020-03-15 16:11:16 +00:00
|
|
|
deploy_test1:
|
|
|
|
stage: integration
|
2020-01-14 20:36:26 +00:00
|
|
|
environment:
|
2020-03-15 16:11:16 +00:00
|
|
|
name: test1
|
|
|
|
url: https://test1.startinblox.com
|
2020-01-14 20:36:26 +00:00
|
|
|
script:
|
2020-03-15 16:11:16 +00:00
|
|
|
- echo "$APP_CONFIG_TEST1" > config.json
|
|
|
|
- echo "$SSH_ASTRAL_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/
|
2020-01-14 20:36:26 +00:00
|
|
|
only:
|
2020-03-16 09:50:07 +00:00
|
|
|
- /^feature\/.*/
|
2020-01-14 20:36:26 +00:00
|
|
|
when: manual
|
|
|
|
tags:
|
2020-03-15 16:11:16 +00:00
|
|
|
- deploy
|
2020-01-14 20:36:26 +00:00
|
|
|
|
2020-03-15 16:11:16 +00:00
|
|
|
deploy_test2:
|
|
|
|
stage: integration
|
2020-01-14 20:36:26 +00:00
|
|
|
environment:
|
2020-03-15 16:11:16 +00:00
|
|
|
name: test2
|
|
|
|
url: https://test2.startinblox.com
|
2020-01-14 20:36:26 +00:00
|
|
|
script:
|
2020-03-15 16:11:16 +00:00
|
|
|
- echo "$APP_CONFIG_TEST2" > config.json
|
|
|
|
- echo "$SSH_ASTRAL_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
|
2020-01-14 20:36:26 +00:00
|
|
|
- npm install
|
|
|
|
- npm run build
|
2020-03-15 16:11:16 +00:00
|
|
|
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test2@astral.startinblox.com:~/front/
|
2020-01-14 20:36:26 +00:00
|
|
|
only:
|
2020-03-16 09:51:57 +00:00
|
|
|
- /^feature\/.*/
|
2020-01-14 20:36:26 +00:00
|
|
|
when: manual
|
|
|
|
tags:
|
2020-03-15 16:11:16 +00:00
|
|
|
- deploy
|
|
|
|
|
|
|
|
deploy_test3:
|
|
|
|
stage: integration
|
|
|
|
environment:
|
|
|
|
name: test3
|
|
|
|
url: https://test3.startinblox.com
|
|
|
|
script:
|
|
|
|
- echo "$APP_CONFIG_TEST3" > config.json
|
|
|
|
- echo "$SSH_ASTRAL_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\/.*/
|
2020-03-15 16:11:16 +00:00
|
|
|
when: manual
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
deploy_stg1:
|
|
|
|
stage: acceptance
|
|
|
|
environment:
|
|
|
|
name: stg1
|
|
|
|
url: https://stg1.startinblox.com
|
|
|
|
script:
|
|
|
|
- echo "$APP_CONFIG_STG1" > config.json
|
|
|
|
- echo "$SSH_ASTRAL_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:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- deploy
|
2020-01-14 20:36:26 +00:00
|
|
|
|
2020-03-15 16:11:16 +00:00
|
|
|
deploy_stg2:
|
|
|
|
stage: acceptance
|
2020-01-14 20:36:26 +00:00
|
|
|
environment:
|
2020-03-15 16:11:16 +00:00
|
|
|
name: stg2
|
|
|
|
url: https://stg2.startinblox.com
|
2020-01-14 20:36:26 +00:00
|
|
|
script:
|
2020-03-15 16:11:16 +00:00
|
|
|
- echo "$APP_CONFIG_STG2" > config.json
|
|
|
|
- echo "$SSH_ASTRAL_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/
|
2020-01-14 20:36:26 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
tags:
|
2020-03-15 16:11:16 +00:00
|
|
|
- deploy
|
2020-01-14 20:36:26 +00:00
|
|
|
|
2020-03-15 16:11:16 +00:00
|
|
|
## LIVE DEPLOYMENTS ##
|
2020-01-14 20:36:26 +00:00
|
|
|
|
|
|
|
deploy_nantes:
|
2020-03-15 16:11:16 +00:00
|
|
|
stage: deployment
|
2020-01-14 20:36:26 +00:00
|
|
|
environment:
|
|
|
|
name: nantes
|
|
|
|
url: https://nantes.happy-dev.fr
|
|
|
|
script:
|
2020-03-15 16:11:16 +00:00
|
|
|
- echo 'Not happening yet...'
|
2020-01-14 20:36:26 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
when: manual
|
|
|
|
tags:
|
2020-03-15 16:11:16 +00:00
|
|
|
- deploy
|
2020-01-14 20:36:26 +00:00
|
|
|
|
|
|
|
deploy_paris:
|
2020-03-15 16:11:16 +00:00
|
|
|
stage: deployment
|
2020-01-14 20:36:26 +00:00
|
|
|
environment:
|
|
|
|
name: paris
|
|
|
|
url: https://paris.happy-dev.fr
|
|
|
|
script:
|
2020-03-15 16:11:16 +00:00
|
|
|
- echo 'Not happening yet...'
|
2020-01-14 20:36:26 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
when: manual
|
|
|
|
tags:
|
2020-03-15 16:11:16 +00:00
|
|
|
- deploy
|