summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-07-04 12:26:52 +0200
committerAchilleas Pipinellis <axil@gitlab.com>2018-07-05 11:02:38 +0200
commit72fa064000a5434456544568325ee7b583dbef90 (patch)
tree1efac35d359faac572d5164a7ca5d2c961a67724
parent5c19f09a75d13114ff1c7a889edc31f3155f2973 (diff)
downloadgitlab-ce-72fa064000a5434456544568325ee7b583dbef90.tar.gz
Simplify downstream branch name
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-xscripts/trigger-build-docs14
2 files changed, 6 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2f61a2864f9..caf30093229 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -272,7 +272,7 @@ package-and-qa:
name: review-docs/$CI_COMMIT_REF_SLUG
# DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables
# Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693
- url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
+ url: http://$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
on_stop: review-docs-cleanup
# Trigger a manual docs build in gitlab-docs only on non docs-only branches.
diff --git a/scripts/trigger-build-docs b/scripts/trigger-build-docs
index 2a0e7f4d76e..9ee35684509 100755
--- a/scripts/trigger-build-docs
+++ b/scripts/trigger-build-docs
@@ -16,18 +16,14 @@ end
GITLAB_DOCS_REPO = 'gitlab-com/gitlab-docs'.freeze
#
-# Truncate the remote docs branch name if it's more than 63 characters
-# otherwise we hit the filesystem limit and the directory name where
-# NGINX serves the site won't match the branch name.
+# Truncate the remote docs branch name otherwise we hit the filesystem
+# limit and the directory name where NGINX serves the site won't match
+# the branch name.
#
def docs_branch
# The maximum string length a file can have on a filesystem (ext4)
- # is 63 characters. Let's use something smaller to be 100% sure.
- max = 42
- # Prefix the remote branch with the slug of the project in order
- # to avoid name conflicts in the rare case the branch name already
- # exists in the docs repo and truncate to max length.
- "#{slug}-#{ENV["CI_ENVIRONMENT_SLUG"]}"[0...max]
+ # is 63 characters. CI_ENVIRONMENT_SLUG is limited to 24 characters.
+ ENV["CI_ENVIRONMENT_SLUG"]
end
#