Commit 87df3291 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'trigger-build-docs-script' into 'master'

Check if pipelines for merge requests are enabled

See merge request gitlab-org/gitlab!27784
parents 5a76d154 a3910bbe
...@@ -21,7 +21,13 @@ GITLAB_DOCS_REPO = 'gitlab-org/gitlab-docs'.freeze ...@@ -21,7 +21,13 @@ GITLAB_DOCS_REPO = 'gitlab-org/gitlab-docs'.freeze
# kicked the review app. # kicked the review app.
# #
def docs_branch def docs_branch
# Check if CI_MERGE_REQUEST_IID is present. This requires pipelines
# for merge requests to be enabled.
if ENV["CI_MERGE_REQUEST_IID"].nil?
"docs-preview-#{slug}-#{ENV["CI_COMMIT_REF_SLUG"]}"
else
"docs-preview-#{slug}-#{ENV["CI_MERGE_REQUEST_IID"]}" "docs-preview-#{slug}-#{ENV["CI_MERGE_REQUEST_IID"]}"
end
end end
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment