Commit bea46788 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch...

Merge branch '2877-code-quality-requires-codequality-json-to-be-the-only-artifact-file-in-the-job' into 'master'

Resolve "Code quality requires `codequality.json` to be the only artifact file in the job"

Closes #2877

See merge request gitlab-org/gitlab-ee!4203
parents 33ead173 593a78e0
---
title: Update behavior of MR widgets that require pipeline artifacts to allow jobs
with multiple artifacts
merge_request: 4203
author:
type: changed
......@@ -38,10 +38,7 @@ In order for the report to show in the merge request, you need to specify a
`codeclimate.json` as an artifact. GitLab will then check this file and show
the information inside the merge request.
`codeclimate.json` needs to be the only artifact file for the job. If you try
to also include other files, like Code Climate's HTML report, it will break the
Code Climate display in the merge request.
>**Note:**
If the Code Climate report doesn't have anything to compare to, no information
will be displayed in the merge request area. That is the case when you add the
`codequality` job in your `.gitlab-ci.yml` for the very first time.
......
......@@ -63,7 +63,7 @@ module EE
private
def has_artifact?(name)
options.dig(:artifacts, :paths) == [name] &&
options.dig(:artifacts, :paths)&.include?(name) &&
artifacts_metadata?
end
end
......
......@@ -146,7 +146,7 @@ describe Ci::Build do
pipeline: pipeline,
options: {
artifacts: {
paths: [filename]
paths: [filename, 'some-other-artifact.txt']
}
}
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment