Commit 5cf6bade authored by Olivier Gonzalez's avatar Olivier Gonzalez

Ensure all combination of job and artifact name are working together

parent 7c1c3075
......@@ -20,9 +20,7 @@ module EE
DAST_FILE = 'gl-dast-report.json'.freeze
included do
# codeclimate is deprecated and replaced with code_quality (#5779)
scope :codeclimate, -> { where(name: %w[codeclimate codequality]) }
scope :code_quality, -> { where(name: 'code_quality') }
scope :code_quality, -> { where(name: %w[codeclimate codequality code_quality]) }
scope :performance, -> { where(name: %w[performance deploy]) }
scope :sast, -> { where(name: 'sast') }
scope :dependency_scanning, -> { where(name: 'dependency_scanning') }
......
......@@ -14,7 +14,7 @@ module EE
# codeclimate_artifact is deprecated and replaced with code_quality_artifact (#5779)
def codeclimate_artifact
@codeclimate_artifact ||= artifacts.codeclimate.find(&:has_codeclimate_json?)
@codeclimate_artifact ||= artifacts.code_quality.find(&:has_codeclimate_json?)
end
def code_quality_artifact
......
......@@ -18,8 +18,13 @@ describe Ci::Pipeline do
end
PIPELINE_ARTIFACTS_METHODS = [
# codeclimate_artifact is deprecated and replaced with code_quality_artifact (#5779)
{ method: :codeclimate_artifact, options: [Ci::Build::CODECLIMATE_FILE, 'codeclimate'] },
{ method: :codeclimate_artifact, options: [Ci::Build::CODECLIMATE_FILE, 'codequality'] },
{ method: :code_quality_artifact, options: [Ci::Build::CODEQUALITY_FILE, 'code_quality'] },
{ method: :codeclimate_artifact, options: [Ci::Build::CODECLIMATE_FILE, 'code_quality'] },
{ method: :code_quality_artifact, options: [Ci::Build::CODE_QUALITY_FILE, 'codeclimate'] },
{ method: :code_quality_artifact, options: [Ci::Build::CODE_QUALITY_FILE, 'codequality'] },
{ method: :code_quality_artifact, options: [Ci::Build::CODE_QUALITY_FILE, 'code_quality'] },
{ method: :performance_artifact, options: [Ci::Build::PERFORMANCE_FILE, 'performance'] },
{ method: :sast_artifact, options: [Ci::Build::SAST_FILE, 'sast'] },
{ method: :dependency_scanning_artifact, options: [Ci::Build::DEPENDENCY_SCANNING_FILE, 'dependency_scanning'] },
......
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