use job template to prevent copy&pasting

This commit is contained in:
Manuel Friedli 2016-06-27 00:11:18 +02:00
parent 491a130991
commit 7448563449
1 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,11 @@ stages:
- deploy
- cleanup
.run_deploy: &run_deploy
script:
- chmod +x ./deploy.sh
- ./deploy.sh
build_job:
stage: build
script:
@ -34,7 +39,7 @@ cleanup_build_job:
develop:
stage: deploy
script: ./deploy.sh
<<: *run_deploy
environment: develop
except:
- tags
@ -45,7 +50,7 @@ develop:
staging:
stage: deploy
script: ./deploy.sh
<<: *run_deploy
environment: staging
only:
- develop
@ -54,7 +59,7 @@ staging:
production:
stage: deploy
script: ./deploy.sh
<<: *run_deploy
environment: production
only:
- master