uhr/.gitlab-ci.yml

59 lines
855 B
YAML
Raw Normal View History

variables:
2016-06-26 22:51:03 +02:00
NPMPATH: "node_modules/.bin"
stages:
- build
2016-06-26 23:02:18 +02:00
- cleanup_build
- deploy
2016-06-26 23:02:18 +02:00
- cleanup
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
2015-07-14 00:06:29 +02:00
tags:
except:
2015-10-07 19:14:09 +02:00
- tags
artifacts:
2016-06-26 22:22:09 +02:00
paths:
- dist/
- info/
- resources/
- index.html
- manifest.appcache
2016-06-26 23:02:18 +02:00
cleanup_build_job:
stage: cleanup_build
script:
- rm -rf node_modules
- rm -rf bower_components
- rm -rf dist
2016-06-26 23:02:18 +02:00
when: on_failure
staging:
stage: deploy
script: deploy.sh
environment: staging
only:
- develop
variables:
2016-06-26 22:28:07 +02:00
ENVIRON: staging
production:
stage: deploy
script: deploy.sh
environment: production
only:
- master
variables:
2016-06-26 22:28:07 +02:00
ENVIRON: 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:
- rm -rf node_modules
- rm -rf bower_components
2016-06-26 22:53:54 +02:00
when: always