hubl/.gitlab-ci.yml

124 lines
2.7 KiB
YAML

image: node:11
stages:
- integration
- acceptance
- deployment
## TESTING ##
## VALIDATION ##
deploy_test1:
stage: integration
environment:
name: test1
url: https://test1.startinblox.com
script:
- 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/
only:
- /^feature\/.*/
when: manual
tags:
- deploy
deploy_test2:
stage: integration
environment:
name: test2
url: https://test2.startinblox.com
script:
- echo "$APP_CONFIG_TEST2" > 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/* test2@astral.startinblox.com:~/front/
only:
- /^feature\/.*/
when: manual
tags:
- 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:
- /^feature\/.*/
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:
- /^release\/.*/
when: manual
tags:
- deploy
deploy_stg2:
stage: acceptance
environment:
name: stg2
url: https://stg2.startinblox.com
script:
- 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/
only:
- /^release\/.*/
when: manual
tags:
- deploy
## LIVE DEPLOYMENTS ##
deploy_nantes:
stage: deployment
environment:
name: nantes
url: https://nantes.happy-dev.fr
script:
- echo 'Not happening yet...'
only:
- master
when: manual
tags:
- deploy
deploy_paris:
stage: deployment
environment:
name: paris
url: https://paris.happy-dev.fr
script:
- echo 'Not happening yet...'
only:
- master
when: manual
tags:
- deploy