diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2018-03-29 11:24:08 +0200 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-03-29 14:47:51 +0200 |
commit | e09f99b2a3a969baa97608b9358a8551e87655d4 (patch) | |
tree | b43dd2f937c3370daa412291c017008b78282f47 /app/models/ci/artifact_blob.rb | |
parent | 225015820bb8b79b2030599cd6a0dbb42a27451f (diff) | |
download | gitlab-ce-e09f99b2a3a969baa97608b9358a8551e87655d4.tar.gz |
Add port number to artifacts links to gitlab-pages, if needed
Diffstat (limited to 'app/models/ci/artifact_blob.rb')
-rw-r--r-- | app/models/ci/artifact_blob.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/ci/artifact_blob.rb b/app/models/ci/artifact_blob.rb index ec56cc53aea..760f01f225b 100644 --- a/app/models/ci/artifact_blob.rb +++ b/app/models/ci/artifact_blob.rb @@ -36,16 +36,15 @@ module Ci def external_url(project, job) return unless external_link?(job) - full_path_parts = project.full_path_components - top_level_group = full_path_parts.shift + url_project_path = project.full_path.partition('/').last artifact_path = [ - '-', *full_path_parts, '-', + '-', url_project_path, '-', 'jobs', job.id, 'artifacts', path ].join('/') - "#{pages_config.protocol}://#{top_level_group}.#{pages_config.host}/#{artifact_path}" + "#{project.pages_group_url}/#{artifact_path}" end def external_link?(job) |