Split CI into build and deploy stages like russell.ballestrini.net
This commit is contained in:
parent
019c76b4d5
commit
b23aa92541
2 changed files with 17 additions and 7 deletions
11
.gitlab-ci-deploy.yml
Normal file
11
.gitlab-ci-deploy.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
stages:
|
||||
- deploy
|
||||
|
||||
deploy_to_www_unturf_com:
|
||||
stage: deploy
|
||||
tags: ["mps-router1"]
|
||||
script:
|
||||
# Publish build to Salt Master
|
||||
- sudo /opt/salt-call-state-highstate.sh
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
stages:
|
||||
- build
|
||||
- www.unturf.com
|
||||
- trigger-deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
|
@ -14,11 +14,10 @@ build:
|
|||
- commit-hash.txt
|
||||
expire_in: 1 month
|
||||
|
||||
www.unturf.com:
|
||||
stage: www.unturf.com
|
||||
tags: ["mps-router1"]
|
||||
script:
|
||||
# publish build to Salt Master
|
||||
- sudo /opt/salt-call-state-highstate.sh
|
||||
trigger_deploy:
|
||||
stage: trigger-deploy
|
||||
trigger:
|
||||
include:
|
||||
- local: .gitlab-ci-deploy.yml
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
Loading…
Add table
Add a link
Reference in a new issue