2018-06-05 12:41:15 +00:00
|
|
|
image: node:latest
|
|
|
|
|
2018-06-05 11:09:06 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- yarn install
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
coverage: '/^Statements\s*:\s*([^%]+)/'
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- reports/
|
|
|
|
script:
|
|
|
|
yarn test
|
2018-06-05 11:18:41 +00:00
|
|
|
tags:
|
|
|
|
- shared
|
2018-06-05 11:09:06 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build/
|
|
|
|
script:
|
|
|
|
- yarn build
|
2018-06-05 11:18:41 +00:00
|
|
|
tags:
|
|
|
|
- shared
|
2018-06-05 11:09:06 +00:00
|
|
|
|
|
|
|
deploy_preview:
|
|
|
|
stage: deploy
|
|
|
|
environment:
|
|
|
|
name: preview
|
|
|
|
url: https://preview.regexper.com
|
|
|
|
variables:
|
|
|
|
BANNER: preview
|
|
|
|
CLOUD_FRONT_ID: $PREVIEW_CLOUDFRONT_ID
|
|
|
|
DEPLOY_BUCKET: $PREVIEW_DEPLOY_BUCKET
|
|
|
|
DEPLOY_ENV: preview
|
|
|
|
GA_PROPERTY: $PREVIEW_GA_PROPERTY
|
|
|
|
script:
|
|
|
|
- yarn deploy
|
|
|
|
only:
|
|
|
|
- react # TODO: Change to master once merged
|
2018-06-05 11:18:41 +00:00
|
|
|
tags:
|
|
|
|
- shared
|
2018-06-05 11:09:06 +00:00
|
|
|
|
|
|
|
deploy_production:
|
|
|
|
stage: deploy
|
|
|
|
environment:
|
|
|
|
name: production
|
|
|
|
url: https://regexper.com
|
|
|
|
script:
|
|
|
|
- yarn deploy
|
|
|
|
only:
|
|
|
|
- tags
|
2018-06-05 11:18:41 +00:00
|
|
|
tags:
|
|
|
|
- shared
|