2016-06-26 22:42:49 +02:00
|
|
|
variables:
|
2016-06-26 22:51:03 +02:00
|
|
|
NPMPATH: "node_modules/.bin"
|
2016-06-26 22:42:49 +02:00
|
|
|
|
2016-06-26 22:20:30 +02:00
|
|
|
stages:
|
|
|
|
- build
|
2016-06-26 23:02:18 +02:00
|
|
|
- cleanup_build
|
2016-06-26 22:20:30 +02:00
|
|
|
- deploy
|
2016-06-26 23:02:18 +02:00
|
|
|
- cleanup
|
2016-06-26 22:20:30 +02:00
|
|
|
|
2016-06-27 00:11:18 +02:00
|
|
|
.run_deploy: &run_deploy
|
|
|
|
script:
|
|
|
|
- chmod +x ./deploy.sh
|
|
|
|
- ./deploy.sh
|
|
|
|
|
2016-06-26 23:02:18 +02:00
|
|
|
build_job:
|
|
|
|
stage: build
|
2015-07-14 00:06:29 +02:00
|
|
|
script:
|
2015-10-07 19:14:09 +02:00
|
|
|
- npm install
|
2016-06-26 22:51:03 +02:00
|
|
|
- $NPMPATH/bower install
|
|
|
|
- $NPMPATH/grunt
|
2016-06-27 01:19:34 +02:00
|
|
|
tags:
|
|
|
|
- javascript
|
2015-07-14 00:06:29 +02:00
|
|
|
except:
|
2015-10-07 19:14:09 +02:00
|
|
|
- tags
|
2016-06-26 22:20:30 +02:00
|
|
|
artifacts:
|
2016-06-26 22:22:09 +02:00
|
|
|
paths:
|
2016-06-26 23:56:15 +02:00
|
|
|
- dist/*.min.*
|
2016-06-26 22:22:09 +02:00
|
|
|
- info/
|
|
|
|
- resources/
|
|
|
|
- index.html
|
|
|
|
- manifest.appcache
|
2016-06-26 22:20:30 +02:00
|
|
|
|
2016-06-26 23:02:18 +02:00
|
|
|
cleanup_build_job:
|
|
|
|
stage: cleanup_build
|
|
|
|
script:
|
2016-06-27 00:00:20 +02:00
|
|
|
- rm -rf node_modules
|
|
|
|
- rm -rf bower_components
|
|
|
|
- rm -rf dist
|
2016-06-26 23:02:18 +02:00
|
|
|
when: on_failure
|
|
|
|
|
2016-06-27 00:00:20 +02:00
|
|
|
develop:
|
|
|
|
stage: deploy
|
2016-06-27 00:11:18 +02:00
|
|
|
<<: *run_deploy
|
2016-06-27 00:00:20 +02:00
|
|
|
environment: develop
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
variables:
|
|
|
|
ENVIRON: develop
|
2016-06-27 00:49:00 +02:00
|
|
|
TARGET: $WWW_DEPLOY_ROOT_DEVELOP
|
2016-06-27 00:00:20 +02:00
|
|
|
|
2016-06-26 22:20:30 +02:00
|
|
|
staging:
|
|
|
|
stage: deploy
|
2016-06-27 00:11:18 +02:00
|
|
|
<<: *run_deploy
|
2016-06-26 22:20:30 +02:00
|
|
|
environment: staging
|
|
|
|
only:
|
2016-06-27 00:00:20 +02:00
|
|
|
- develop
|
2016-06-26 22:20:30 +02:00
|
|
|
variables:
|
2016-06-26 22:28:07 +02:00
|
|
|
ENVIRON: staging
|
2016-06-27 00:47:59 +02:00
|
|
|
TARGET: $WWW_DEPLOY_ROOT_STAGING
|
2016-06-26 22:20:30 +02:00
|
|
|
|
|
|
|
production:
|
|
|
|
stage: deploy
|
2016-06-27 00:11:18 +02:00
|
|
|
<<: *run_deploy
|
2016-06-26 22:20:30 +02:00
|
|
|
environment: production
|
|
|
|
only:
|
2016-06-27 00:00:20 +02:00
|
|
|
- master
|
2016-06-26 22:20:30 +02:00
|
|
|
variables:
|
2016-06-26 22:28:07 +02:00
|
|
|
ENVIRON: production
|
2016-06-27 00:49:00 +02:00
|
|
|
TARGET: $WWW_DEPLOY_ROOT_PRODUCTION
|
2016-06-26 22:53:54 +02:00
|
|
|
|
2016-06-26 23:02:18 +02:00
|
|
|
cleanup_job:
|
|
|
|
stage: cleanup
|
2016-06-26 22:53:54 +02:00
|
|
|
script:
|
2016-06-27 00:00:20 +02:00
|
|
|
- rm -rf node_modules
|
|
|
|
- rm -rf bower_components
|
2016-06-26 22:53:54 +02:00
|
|
|
when: always
|