uhr/.gitlab-ci.yml

76 lines
1.1 KiB
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
.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/grunt
tags:
- javascript
2015-07-14 00:06:29 +02:00
except:
2015-10-07 19:14:09 +02:00
- tags
artifacts:
2016-06-26 22:22:09 +02:00
paths:
- dist/*.min.*
2016-06-26 22:22:09 +02:00
- 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 dist
2016-06-26 23:02:18 +02:00
when: on_failure
develop:
stage: deploy
<<: *run_deploy
environment: develop
except:
- tags
- master
- develop
variables:
ENVIRON: develop
2016-06-27 00:49:00 +02:00
TARGET: $WWW_DEPLOY_ROOT_DEVELOP
staging:
stage: deploy
<<: *run_deploy
environment: staging
only:
- develop
variables:
2016-06-26 22:28:07 +02:00
ENVIRON: staging
2016-06-27 00:47:59 +02:00
TARGET: $WWW_DEPLOY_ROOT_STAGING
production:
stage: deploy
<<: *run_deploy
environment: production
only:
- master
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:
- rm -rf node_modules
2016-06-26 22:53:54 +02:00
when: always