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:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
- cleanup_build
|
||||||
- deploy
|
- deploy
|
||||||
- clean_after_deploy
|
- cleanup
|
||||||
|
|
||||||
Npm, Bower, Grunt:
|
build_job:
|
||||||
|
stage: build
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
- $NPMPATH/bower install
|
- $NPMPATH/bower install
|
||||||
|
@ -14,7 +16,6 @@ Npm, Bower, Grunt:
|
||||||
tags:
|
tags:
|
||||||
except:
|
except:
|
||||||
- tags
|
- tags
|
||||||
stage: build
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- dist/
|
- dist/
|
||||||
|
@ -23,6 +24,14 @@ Npm, Bower, Grunt:
|
||||||
- index.html
|
- index.html
|
||||||
- manifest.appcache
|
- manifest.appcache
|
||||||
|
|
||||||
|
cleanup_build_job:
|
||||||
|
stage: cleanup_build
|
||||||
|
script:
|
||||||
|
- rm -r node_modules
|
||||||
|
- rm -r bower_components
|
||||||
|
- rm -r dist
|
||||||
|
when: on_failure
|
||||||
|
|
||||||
staging:
|
staging:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script: deploy.sh
|
script: deploy.sh
|
||||||
|
@ -41,12 +50,10 @@ production:
|
||||||
variables:
|
variables:
|
||||||
ENVIRON: production
|
ENVIRON: production
|
||||||
|
|
||||||
clean:
|
cleanup_job:
|
||||||
stage: clean_after_deploy
|
stage: cleanup
|
||||||
script:
|
script:
|
||||||
- rm -r node_modules
|
- rm -r node_modules
|
||||||
- rm -r bower_components
|
- rm -r bower_components
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue