diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-09-07 14:46:23 -0400 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-09-07 14:46:23 -0400 |
commit | 3d9b6bc2b98583a5220870025e942077c9303eaf (patch) | |
tree | c938afc9a0e169ab8ff0b6b55b96c2a5b365efee /scripts/trigger-build-docs | |
parent | e4348ae8c221a63d0e2c4e428fcae8c3bca0eb2f (diff) | |
parent | bc955cfc8e75e17897ab25717176209fefbba915 (diff) | |
download | gitlab-ce-backport-issues-controller-changes.tar.gz |
Merge branch 'master' into backport-issues-controller-changesbackport-issues-controller-changes
Diffstat (limited to 'scripts/trigger-build-docs')
-rwxr-xr-x | scripts/trigger-build-docs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/trigger-build-docs b/scripts/trigger-build-docs index e58edf189cf..44f832ed3e6 100755 --- a/scripts/trigger-build-docs +++ b/scripts/trigger-build-docs @@ -7,7 +7,7 @@ require 'gitlab' # in order to avoid conflicts # @docs_branch = "#{ENV["CI_COMMIT_REF_SLUG"]}-built-from-ce-ee" -GITLAB_DOCS_REPO = 'gitlab-com/gitlab-docs' +GITLAB_DOCS_REPO = 'gitlab-com/gitlab-docs'.freeze # # Configure credentials to be used with gitlab gem @@ -20,8 +20,8 @@ end # # Dummy way to find out in which repo we are, CE or EE # -def is_ee? - File.exists?('CHANGELOG-EE.md') +def ee? + File.exist?('CHANGELOG-EE.md') end # @@ -30,7 +30,7 @@ end def create_remote_branch Gitlab.create_branch(GITLAB_DOCS_REPO, @docs_branch, 'master') puts "Remote branch '#{@docs_branch}' created" -rescue Gitlab::Error::BadRequest => e +rescue Gitlab::Error::BadRequest puts "Remote branch '#{@docs_branch}' already exists" end @@ -47,10 +47,10 @@ end # def trigger_pipeline # Overriding vars in https://gitlab.com/gitlab-com/gitlab-docs/blob/master/.gitlab-ci.yml - param_name = is_ee? ? 'BRANCH_EE' : 'BRANCH_CE' + param_name = ee? ? 'BRANCH_EE' : 'BRANCH_CE' # The review app URL - app_url = "http://#{@docs_branch}.#{ENV["DOCS_REVIEW_APPS_DOMAIN"]}/#{is_ee? ? 'ee' : 'ce'}" + app_url = "http://#{@docs_branch}.#{ENV["DOCS_REVIEW_APPS_DOMAIN"]}/#{ee? ? 'ee' : 'ce'}" # Create the pipeline puts "=> Triggering a pipeline..." |