Commit f457adeb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'dz-rename-clair-to-sast-image' into 'master'

Rename CI job `clair` to `sast:image`

See merge request gitlab-org/gitlab-ee!3816
parents a45b739c 8ba3f428
......@@ -10,13 +10,13 @@ module EE
CODEQUALITY_FILE = 'codeclimate.json'.freeze
SAST_FILE = 'gl-sast-report.json'.freeze
PERFORMANCE_FILE = 'performance.json'.freeze
CLAIR_FILE = 'gl-clair-report.json'.freeze
CLAIR_FILE = 'gl-sast-image-report.json'.freeze
included do
scope :codequality, ->() { where(name: %w[codequality codeclimate]) }
scope :performance, ->() { where(name: %w[performance deploy]) }
scope :sast, ->() { where(name: 'sast') }
scope :clair, ->() { where(name: 'clair') }
scope :clair, ->() { where(name: 'sast:image') }
after_save :stick_build_if_status_changed
end
......
......@@ -16,20 +16,22 @@ describe Ci::Pipeline do
end
ARTIFACTS_METHODS = {
codeclimate_artifact: Ci::Build::CODEQUALITY_FILE,
performance_artifact: Ci::Build::PERFORMANCE_FILE,
sast_artifact: Ci::Build::SAST_FILE,
clair_artifact: Ci::Build::CLAIR_FILE
codeclimate_artifact: [Ci::Build::CODEQUALITY_FILE, 'codequality'],
performance_artifact: [Ci::Build::PERFORMANCE_FILE, 'performance'],
sast_artifact: [Ci::Build::SAST_FILE, 'sast'],
clair_artifact: [Ci::Build::CLAIR_FILE, 'sast:image']
}.freeze
ARTIFACTS_METHODS.each do |method, filename|
ARTIFACTS_METHODS.each do |method, options|
describe method.to_s do
context 'has corresponding job' do
let!(:build) do
filename, name = options
create(
:ci_build,
:artifacts,
name: method.to_s.sub('_artifact', ''),
name: name,
pipeline: pipeline,
options: {
artifacts: {
......
......@@ -30,7 +30,7 @@ describe MergeRequestWidgetEntity do
end
it 'has clair data' do
build = create(:ci_build, name: 'clair')
build = create(:ci_build, name: 'sast:image')
allow(subject).to receive(:expose_clair_data?).and_return(true)
allow(merge_request).to receive(:clair_artifact).and_return(build)
......
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