2016-08-15 20:28:23 +02:00
|
|
|
stages:
|
2016-09-15 21:32:14 +02:00
|
|
|
- build
|
|
|
|
- cleanup_build
|
2017-03-07 04:12:52 +01:00
|
|
|
- deploy_new
|
2017-03-07 04:16:22 +01:00
|
|
|
- deploy
|
2016-09-15 23:40:44 +02:00
|
|
|
# - cleanup
|
2016-08-15 20:28:23 +02:00
|
|
|
|
|
|
|
.run_deploy: &run_deploy
|
|
|
|
script:
|
|
|
|
- chmod +x ./deploy.sh
|
2017-03-07 04:16:22 +01:00
|
|
|
# - ./deploy.sh
|
|
|
|
# dependencies:
|
|
|
|
# - build_job
|
2016-08-15 20:28:23 +02:00
|
|
|
|
2016-09-15 21:32:14 +02:00
|
|
|
build_job:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- npm install
|
2016-09-15 21:43:03 +02:00
|
|
|
- npm run tsc
|
2016-09-15 21:32:14 +02:00
|
|
|
tags:
|
|
|
|
- javascript
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- app/*.css
|
|
|
|
- app/*.html
|
|
|
|
- app/*.js
|
|
|
|
- app/*.js.map
|
2016-09-21 01:43:21 +02:00
|
|
|
- app/converter/*.js
|
|
|
|
- app/converter/*.js.map
|
2016-09-21 02:40:05 +02:00
|
|
|
- node_modules/@angular/
|
2016-09-15 21:32:14 +02:00
|
|
|
- node_modules/core-js/client/shim.js
|
|
|
|
- node_modules/zone.js/dist/zone.js
|
|
|
|
- node_modules/reflect-metadata/Reflect.js
|
2016-09-21 02:51:41 +02:00
|
|
|
- node_modules/rxjs/
|
2016-09-15 21:32:14 +02:00
|
|
|
- node_modules/systemjs/dist/system.src.js
|
2016-09-21 01:43:21 +02:00
|
|
|
- node_modules/utf8/utf8.js
|
|
|
|
- node_modules/quoted-printable/quoted-printable.js
|
2016-09-28 00:06:10 +02:00
|
|
|
- node_modules/punycode/punycode.js
|
2016-09-21 01:43:21 +02:00
|
|
|
- abeezee-regular.woff
|
|
|
|
- freemono.eot
|
|
|
|
- freemono.svg
|
|
|
|
- freemono.ttf
|
|
|
|
- freemono.woff
|
2016-09-15 21:32:14 +02:00
|
|
|
- index.html
|
|
|
|
- package.json
|
|
|
|
- systemjs.config.js
|
2016-09-21 02:31:42 +02:00
|
|
|
expire_in: 30 min
|
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
|
|
|
|
2017-03-07 04:12:52 +01:00
|
|
|
pages:
|
|
|
|
stage: deploy_new
|
|
|
|
environment: pages
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
- master
|
|
|
|
script:
|
|
|
|
- mkdir -p public/{app/converter,node_modules/{@angular,core-js/client,zone.js/dist,reflect-metadata,rxjs,systemjs/dist,utf8,quoted-printable,punycode}}
|
|
|
|
- cp -a index.html abeezee-regular.woff freemono.* package.json systemjs.config.js public/
|
|
|
|
- cp -a app/*.css app/*.html app/*.js app/*.js.map public/app/
|
2017-03-07 04:23:23 +01:00
|
|
|
- cp -a app/converter/*.js app/converter/*.js.map public/app/converter/
|
2017-03-07 04:12:52 +01:00
|
|
|
- cp -a node_modules/@angular/* public/node_modules/@angular/
|
|
|
|
- cp -a node_modules/core-js/client/shim.js public/node_modules/core-js/client/
|
|
|
|
- cp -a node_modules/zone.js/dist/zone.js public/node_modules/zone.js/dist/
|
|
|
|
- cp -a node_modules/reflect-metadata/Reflect.js public/node_modules/reflect-metadata/
|
|
|
|
- cp -a node_modules/rxjs/* public/node_modules/rxjs/
|
|
|
|
- cp -a node_modules/systemjs/dist/system.src.js public/node_modules/systemjs/dist/
|
|
|
|
- cp -a node_modules/utf8/utf8.js public/node_modules/utf8/
|
|
|
|
- cp -a node_modules/quoted-printable/quoted-printable.js public/node_modules/quoted-printable/
|
|
|
|
- cp -a node_modules/punycode/punycode.js public/node_modules/punycode/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
dependencies:
|
|
|
|
- build_job
|
|
|
|
|
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 23:40:44 +02:00
|
|
|
#cleanup_job:
|
|
|
|
# stage: cleanup
|
|
|
|
# script:
|
|
|
|
# - rm -rf node_modules
|
|
|
|
# - rm -rf typings
|
|
|
|
# when: always
|