summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/config/external/file/artifact.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /lib/gitlab/ci/config/external/file/artifact.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'lib/gitlab/ci/config/external/file/artifact.rb')
-rw-r--r--lib/gitlab/ci/config/external/file/artifact.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/external/file/artifact.rb b/lib/gitlab/ci/config/external/file/artifact.rb
index 4f79e64ca9a..1244c7f7475 100644
--- a/lib/gitlab/ci/config/external/file/artifact.rb
+++ b/lib/gitlab/ci/config/external/file/artifact.rb
@@ -28,6 +28,14 @@ module Gitlab
end
end
+ def metadata
+ super.merge(
+ type: :artifact,
+ location: masked_location,
+ extra: { job_name: masked_job_name }
+ )
+ end
+
private
def project
@@ -52,7 +60,7 @@ module Gitlab
end
unless artifact_job.present?
- errors.push("Job `#{job_name}` not found in parent pipeline or does not have artifacts!")
+ errors.push("Job `#{masked_job_name}` not found in parent pipeline or does not have artifacts!")
return false
end
@@ -80,6 +88,12 @@ module Gitlab
parent_pipeline: context.parent_pipeline
}
end
+
+ def masked_job_name
+ strong_memoize(:masked_job_name) do
+ context.mask_variables_from(job_name)
+ end
+ end
end
end
end