2016-08-15 20:28:23 +02:00
|
|
|
stages:
|
2016-09-15 21:32:14 +02:00
|
|
|
- build
|
|
|
|
- cleanup_build
|
2016-08-15 20:28:23 +02:00
|
|
|
- deploy
|
2016-09-15 21:32:14 +02:00
|
|
|
- cleanup
|
2016-08-15 20:28:23 +02:00
|
|
|
|
|
|
|
.run_deploy: &run_deploy
|
|
|
|
script:
|
|
|
|
- chmod +x ./deploy.sh
|
|
|
|
- ./deploy.sh
|
|
|
|
|
2016-09-15 21:32:14 +02:00
|
|
|
build_job:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- npm install
|
|
|
|
tags:
|
|
|
|
- javascript
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- app/*.css
|
|
|
|
- app/*.html
|
|
|
|
- app/*.js
|
|
|
|
- app/*.js.map
|
|
|
|
- node_modules/core-js/client/shim.js
|
|
|
|
- node_modules/zone.js/dist/zone.js
|
|
|
|
- node_modules/reflect-metadata/Reflect.js
|
|
|
|
- node_modules/systemjs/dist/system.src.js
|
|
|
|
- dencode.css
|
|
|
|
- index.html
|
|
|
|
- package.json
|
|
|
|
- systemjs.config.js
|
2016-08-15 20:28:23 +02:00
|
|
|
|
2016-09-15 21:32:14 +02:00
|
|
|
cleanup_build_job:
|
|
|
|
stage: cleanup_build
|
|
|
|
script:
|
|
|
|
- rm -rf node_modules
|
|
|
|
- rm -rf typings
|
|
|
|
when: on_failure
|
2016-08-15 20:28:23 +02:00
|
|
|
|
|
|
|
develop:
|
|
|
|
stage: deploy
|
|
|
|
<<: *run_deploy
|
|
|
|
environment: develop
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
variables:
|
|
|
|
ENVIRON: develop
|
|
|
|
TARGET: $WWW_DEPLOY_ROOT_DEVELOP
|
|
|
|
|
|
|
|
staging:
|
|
|
|
stage: deploy
|
|
|
|
<<: *run_deploy
|
|
|
|
environment: staging
|
|
|
|
only:
|
|
|
|
- develop
|
|
|
|
variables:
|
|
|
|
ENVIRON: staging
|
|
|
|
TARGET: $WWW_DEPLOY_ROOT_STAGING
|
|
|
|
|
|
|
|
production:
|
|
|
|
stage: deploy
|
|
|
|
<<: *run_deploy
|
|
|
|
environment: production
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
variables:
|
|
|
|
ENVIRON: production
|
|
|
|
TARGET: $WWW_DEPLOY_ROOT_PRODUCTION
|
|
|
|
|
2016-09-15 21:32:14 +02:00
|
|
|
cleanup_job:
|
|
|
|
stage: cleanup
|
|
|
|
script:
|
|
|
|
- rm -rf node_modules
|
|
|
|
- rm -rf typings
|
|
|
|
when: always
|