Commit e377606b authored by Terri Chu's avatar Terri Chu

Merge branch '354362-apisec-image_suffix' into 'master'

Change _VERSION_TAG to _IMAGE_SUFFIX in API Sec templates

See merge request gitlab-org/gitlab!84981
parents 0c41d773 0871fe54
......@@ -146,8 +146,8 @@ RSpec.describe 'API-Fuzzing.latest.gitlab-ci.yml' do
create(:ci_variable, project: project, key: 'FUZZAPI_TARGET_URL', value: 'http://example.com')
end
it 'sets FUZZAPI_VERSION_TAG to ""' do
expect(build_variables).to be_include(['FUZZAPI_VERSION_TAG', ''])
it 'sets FUZZAPI_IMAGE_SUFFIX to ""' do
expect(build_variables).to be_include(['FUZZAPI_IMAGE_SUFFIX', ''])
end
end
......@@ -159,8 +159,8 @@ RSpec.describe 'API-Fuzzing.latest.gitlab-ci.yml' do
create(:ci_variable, project: project, key: 'CI_GITLAB_FIPS_MODE', value: 'true')
end
it 'sets FUZZAPI_VERSION_TAG to "-fips"' do
expect(build_variables).to be_include(['FUZZAPI_VERSION_TAG', '-fips'])
it 'sets FUZZAPI_IMAGE_SUFFIX to "-fips"' do
expect(build_variables).to be_include(['FUZZAPI_IMAGE_SUFFIX', '-fips'])
end
end
end
......
......@@ -107,8 +107,8 @@ RSpec.describe 'DAST-API.latest.gitlab-ci.yml' do
create(:ci_variable, project: project, key: 'CI_GITLAB_FIPS_MODE', value: 'false')
end
it 'sets DAST_API_VERSION_TAG to ""' do
expect(build_variables).to be_include(['DAST_API_VERSION_TAG', ''])
it 'sets DAST_API_IMAGE_SUFFIX to ""' do
expect(build_variables).to be_include(['DAST_API_IMAGE_SUFFIX', ''])
end
end
......@@ -120,8 +120,8 @@ RSpec.describe 'DAST-API.latest.gitlab-ci.yml' do
create(:ci_variable, project: project, key: 'CI_GITLAB_FIPS_MODE', value: 'true')
end
it 'sets DAST_API_VERSION_TAG to "-fips"' do
expect(build_variables).to be_include(['DAST_API_VERSION_TAG', '-fips'])
it 'sets DAST_API_IMAGE_SUFFIX to "-fips"' do
expect(build_variables).to be_include(['DAST_API_IMAGE_SUFFIX', '-fips'])
end
end
end
......
......@@ -27,12 +27,12 @@ variables:
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/security-products"
#
FUZZAPI_VERSION: "1"
FUZZAPI_VERSION_TAG: ""
FUZZAPI_IMAGE_SUFFIX: ""
FUZZAPI_IMAGE: api-fuzzing
apifuzzer_fuzz:
stage: fuzz
image: $SECURE_ANALYZERS_PREFIX/$FUZZAPI_IMAGE:$FUZZAPI_VERSION$FUZZAPI_VERSION_TAG
image: $SECURE_ANALYZERS_PREFIX/$FUZZAPI_IMAGE:$FUZZAPI_VERSION$FUZZAPI_IMAGE_SUFFIX
allow_failure: true
rules:
- if: $API_FUZZING_DISABLED
......@@ -43,7 +43,7 @@ apifuzzer_fuzz:
- if: $CI_COMMIT_BRANCH &&
$CI_GITLAB_FIPS_MODE == "true"
variables:
FUZZAPI_VERSION_TAG: "-fips"
FUZZAPI_IMAGE_SUFFIX: "-fips"
- if: $CI_COMMIT_BRANCH
script:
- /peach/analyzer-fuzz-api
......
......@@ -27,12 +27,12 @@ variables:
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/security-products"
#
DAST_API_VERSION: "1"
DAST_API_VERSION_TAG: ""
DAST_API_IMAGE_SUFFIX: ""
DAST_API_IMAGE: api-fuzzing
dast_api:
stage: dast
image: $SECURE_ANALYZERS_PREFIX/$DAST_API_IMAGE:$DAST_API_VERSION$DAST_API_VERSION_TAG
image: $SECURE_ANALYZERS_PREFIX/$DAST_API_IMAGE:$DAST_API_VERSION$DAST_API_IMAGE_SUFFIX
allow_failure: true
rules:
- if: $DAST_API_DISABLED
......@@ -43,7 +43,7 @@ dast_api:
- if: $CI_COMMIT_BRANCH &&
$CI_GITLAB_FIPS_MODE == "true"
variables:
DAST_API_VERSION_TAG: "-fips"
DAST_API_IMAGE_SUFFIX: "-fips"
- if: $CI_COMMIT_BRANCH
script:
- /peach/analyzer-dast-api
......
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