summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 15:09:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 15:09:36 +0000
commit074d013e1eb3f6e0c27f96a3be8b9361254c8a98 (patch)
treef185c474ddc8624a4793c84b0b1f4cc07349694b /scripts
parent8f9beefac3774b30e911fb00a68f4c7a5244cf27 (diff)
downloadgitlab-ce-074d013e1eb3f6e0c27f96a3be8b9361254c8a98.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/trigger-build-docs8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/trigger-build-docs b/scripts/trigger-build-docs
index ea717d9ccbf..70e7150d475 100755
--- a/scripts/trigger-build-docs
+++ b/scripts/trigger-build-docs
@@ -21,7 +21,13 @@ GITLAB_DOCS_REPO = 'gitlab-org/gitlab-docs'.freeze
# kicked the review app.
#
def docs_branch
- "docs-preview-#{slug}-#{ENV["CI_MERGE_REQUEST_IID"]}"
+ # 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"]}"
+ end
end
#