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