diff options
author | winniehell <git@winniehell.de> | 2017-03-09 23:52:47 +0300 |
---|---|---|
committer | winniehell <git@winniehell.de> | 2017-03-20 15:42:09 +0300 |
commit | acbb8c0ff0103b2dc4138384b7be2d51bdf7e337 (patch) | |
tree | bf4df60784c45922e23b6f39cba9d30517ececd2 /.gitlab-ci.yml | |
parent | 67603d04ca2e4123b7018e240ddc87f0eda99a59 (diff) |
Fail trigger_docs if triggering build was not successful
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 3 |
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 |