summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2017-03-09 21:52:47 +0100
committerwinniehell <git@winniehell.de>2017-03-20 13:42:09 +0100
commitacbb8c0ff0103b2dc4138384b7be2d51bdf7e337 (patch)
treebf4df60784c45922e23b6f39cba9d30517ececd2 /.gitlab-ci.yml
parent67603d04ca2e4123b7018e240ddc87f0eda99a59 (diff)
downloadgitlab-ce-acbb8c0ff0103b2dc4138384b7be2d51bdf7e337.tar.gz
Fail trigger_docs if triggering build was not successful
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 03292302a5b..3cea727f811 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -389,7 +389,8 @@ trigger_docs:
cache: {}
artifacts: {}
script:
- - "curl -X POST -F token=${DOCS_TRIGGER_TOKEN} -F ref=master -F variables[PROJECT]=${CI_PROJECT_NAME} https://gitlab.com/api/v3/projects/1794617/trigger/builds"
+ - "HTTP_STATUS=$(curl -X POST -F token=${DOCS_TRIGGER_TOKEN} -F ref=master -F variables[PROJECT]=${CI_PROJECT_NAME} --silent --output curl.log --write-out '%{http_code}' https://gitlab.com/api/v3/projects/1794617/trigger/builds)"
+ - if [ "${HTTP_STATUS}" -ne "201" ]; then echo "Error ${HTTP_STATUS}"; cat curl.log; echo; exit 1; fi
only:
- master@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee