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

View file

@ -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