use job template to prevent copy&pasting
This commit is contained in:
parent
491a130991
commit
7448563449
1 changed files with 8 additions and 3 deletions
|
@ -7,6 +7,11 @@ stages:
|
||||||
- deploy
|
- deploy
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
|
.run_deploy: &run_deploy
|
||||||
|
script:
|
||||||
|
- chmod +x ./deploy.sh
|
||||||
|
- ./deploy.sh
|
||||||
|
|
||||||
build_job:
|
build_job:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
@ -34,7 +39,7 @@ cleanup_build_job:
|
||||||
|
|
||||||
develop:
|
develop:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script: ./deploy.sh
|
<<: *run_deploy
|
||||||
environment: develop
|
environment: develop
|
||||||
except:
|
except:
|
||||||
- tags
|
- tags
|
||||||
|
@ -45,7 +50,7 @@ develop:
|
||||||
|
|
||||||
staging:
|
staging:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script: ./deploy.sh
|
<<: *run_deploy
|
||||||
environment: staging
|
environment: staging
|
||||||
only:
|
only:
|
||||||
- develop
|
- develop
|
||||||
|
@ -54,7 +59,7 @@ staging:
|
||||||
|
|
||||||
production:
|
production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script: ./deploy.sh
|
<<: *run_deploy
|
||||||
environment: production
|
environment: production
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
Loading…
Reference in a new issue