Commit 10e38d8f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '238630-api-fuzzing-prod-staging' into 'master'

Use production container repository for API-Fuzzing template

See merge request gitlab-org/gitlab!40020
parents 1382e6b9 1a7a5241
......@@ -5,6 +5,22 @@ require 'spec_helper'
RSpec.describe 'API-Fuzzing.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('API-Fuzzing') }
describe 'the template file' do
let(:template_filename) { Rails.root.join("lib/gitlab/ci/templates/" + template.full_name) }
let(:contents) { File.read(template_filename) }
let(:production_registry) { 'registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing:${FUZZAPI_VERSION}-engine' }
# Make sure future changes to the template use the production container registry.
#
# The API Fuzzing template is developed against a dev container registry.
# The registry is switched when releasing new versions. The difference in
# names between development and production is also quite small making it
# easy to miss during review.
it 'uses the production repository' do
expect( contents.include?(production_registry) ).to be true
end
end
describe 'the created pipeline' do
let(:user) { create(:admin) }
let(:default_branch) { 'master' }
......
......@@ -80,7 +80,7 @@ apifuzzer_fuzz:
-p 8000:8000 \
-p 514:514 \
--restart=no \
registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing-src:${FUZZAPI_VERSION}-engine
registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing:${FUZZAPI_VERSION}-engine
#
# Start target container
- |
......
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