adapted CI config and deploy script to the new angular/systemjs build

environment
This commit is contained in:
Manuel Friedli 2016-09-15 21:32:14 +02:00
parent c78d928805
commit 0b3a38af3c
2 changed files with 47 additions and 37 deletions

View File

@ -1,42 +1,43 @@
#variables:
# NPMPATH: "node_modules/.bin"
stages:
# - build
# - cleanup_build
- build
- cleanup_build
- deploy
# - cleanup
- cleanup
.run_deploy: &run_deploy
script:
- chmod +x ./deploy.sh
- ./deploy.sh
#build_job:
# stage: build
# script:
# - npm install
# - $NPMPATH/bower install
# - $NPMPATH/grunt
# tags:
# - javascript
# except:
# - tags
# artifacts:
# paths:
# - dist/*.min.*
# - info/
# - resources/
# - index.html
# - manifest.appcache
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
#cleanup_build_job:
# stage: cleanup_build
# script:
# - rm -rf node_modules
# - rm -rf bower_components
# - rm -rf dist
# when: on_failure
cleanup_build_job:
stage: cleanup_build
script:
- rm -rf node_modules
- rm -rf typings
when: on_failure
develop:
stage: deploy
@ -70,9 +71,9 @@ production:
ENVIRON: production
TARGET: $WWW_DEPLOY_ROOT_PRODUCTION
#cleanup_job:
# stage: cleanup
# script:
# - rm -rf node_modules
# - rm -rf bower_components
# when: always
cleanup_job:
stage: cleanup
script:
- rm -rf node_modules
- rm -rf typings
when: always

View File

@ -20,6 +20,15 @@ fi
rm -rf "${destination}/*"
rm -rf "${destination}/.??*"
cp -a dencode.css dencode.js index.html quoted-printable.js utf8.js "${destination}"
cp -a dencode.css index.html package.json systemjs.config.js "${destination}"
mkdir "${destination}/app"
cp -a app/*.css app/*.html app/*.js app/*.js.map "${destination}/app"
mkdir -p "${destination}/node_modules/{core-js/client,zone.js/dist,reflect-metadata,systemjs/dist}"
cp -a node_modules/core-js/client/shim.js "${destination}/node_modules/zone.js/dist"
cp -a node_modules/reflect-metadata/Reflect.js "${destination}/node_modules/reflect-metadata"
cp -a node_modules/systemjs/dist/system.src.js "${destination}/node_modules/systemjs/dist"
echo "Deployment successful."