define cleanup jobs
This commit is contained in:
parent
a64b1d02e7
commit
63cbc1da3c
1 changed files with 14 additions and 7 deletions
|
@ -3,10 +3,12 @@ variables:
|
|||
|
||||
stages:
|
||||
- build
|
||||
- cleanup_build
|
||||
- deploy
|
||||
- clean_after_deploy
|
||||
- cleanup
|
||||
|
||||
Npm, Bower, Grunt:
|
||||
build_job:
|
||||
stage: build
|
||||
script:
|
||||
- npm install
|
||||
- $NPMPATH/bower install
|
||||
|
@ -14,7 +16,6 @@ Npm, Bower, Grunt:
|
|||
tags:
|
||||
except:
|
||||
- tags
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/
|
||||
|
@ -23,6 +24,14 @@ Npm, Bower, Grunt:
|
|||
- index.html
|
||||
- manifest.appcache
|
||||
|
||||
cleanup_build_job:
|
||||
stage: cleanup_build
|
||||
script:
|
||||
- rm -r node_modules
|
||||
- rm -r bower_components
|
||||
- rm -r dist
|
||||
when: on_failure
|
||||
|
||||
staging:
|
||||
stage: deploy
|
||||
script: deploy.sh
|
||||
|
@ -41,12 +50,10 @@ production:
|
|||
variables:
|
||||
ENVIRON: production
|
||||
|
||||
clean:
|
||||
stage: clean_after_deploy
|
||||
cleanup_job:
|
||||
stage: cleanup
|
||||
script:
|
||||
- rm -r node_modules
|
||||
- rm -r bower_components
|
||||
when: always
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue