hubl/.gitlab-ci.yml

90 lines
1.9 KiB
YAML
Raw Normal View History

image: node
stages:
2020-01-14 21:04:17 +00:00
- validate_features
- prepare_release
- validate_release
- deploy_production
## TESTING ##
## VALIDATION ##
deploy_features:
2020-01-14 21:02:52 +00:00
stage: validate_features
environment:
name: integration
url: https://integration.startinblox.com
script:
- echo 'Environment is not setup yet...'
only:
- feature/*
when: manual
tags:
- sib
2020-01-14 21:02:52 +00:00
deploy_review:
stage: prepare_release
environment:
2020-01-14 21:02:52 +00:00
name: review
url: https://review.startinblox.com
script:
- echo "$APP_CONFIG_PARIS_STG" > config.json
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-paris@ssh-test-paris.happy-dev.fr:~/staging/www/
only:
- dev
when: manual
tags:
- sib
2020-01-14 21:02:52 +00:00
deploy_staging:
stage: validate_release
environment:
2020-01-14 21:02:52 +00:00
name: staging
url: https://staging.startinblox.com
script:
- echo 'Environment is not setup yet...'
only:
- master
tags:
- sib
## LIVE DEPLOYMENT ##
deploy_nantes:
2020-01-14 21:02:52 +00:00
stage: deploy_production
environment:
name: nantes
url: https://nantes.happy-dev.fr
script:
- echo "$APP_CONFIG_NANTES" > config.json
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-paris@ssh-test-paris.happy-dev.fr:~/staging/www/
only:
- master
when: manual
tags:
- sib
deploy_paris:
2020-01-14 21:02:52 +00:00
stage: deploy_production
environment:
name: paris
url: https://paris.happy-dev.fr
script:
- echo "$APP_CONFIG_PARIS" > config.json
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm install
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test-paris@ssh-test-paris.happy-dev.fr:~/www/
only:
- master
when: manual
tags:
- sib