allow force scanning all containers

This commit is contained in:
Matthew McClaskey 2023-11-22 17:13:20 +00:00
parent eae04604e1
commit cda41bf89f
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ stages:
variables:
KASM_RELEASE: "1.14.0"
TEST_INSTALLER: "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.7f3582.tar.gz"
SCAN_CONTAINERS: "true"
before_script:
- export SANITIZED_BRANCH="$(echo $CI_COMMIT_REF_NAME | sed -r 's#^release/##' | sed 's/\//_/g')"

View File

@ -141,7 +141,7 @@ scan_{{ IMAGE.name1 }}_{{ IMAGE.name2 }}:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: ($CI_COMMIT_BRANCH =~ /^release\/.*$/ || $CI_COMMIT_BRANCH == "develop" || $CI_PIPELINE_SOURCE == "schedule")
- if: ($CI_COMMIT_BRANCH =~ /^release\/.*$/ || $CI_COMMIT_BRANCH == "develop" || $CI_PIPELINE_SOURCE == "schedule" || $SCAN_CONTAINERS == "true")
{% if FILE_LIMITS %}changes:
{% for FILE in files %}- {{ FILE }}
{% endfor %}{% for FILE in IMAGE.changeFiles %}- {{ FILE }}
@ -172,7 +172,7 @@ scan_{{ IMAGE.name1 }}_{{ IMAGE.name2 }}:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: ($CI_COMMIT_BRANCH =~ /^release\/.*$/ || $CI_COMMIT_BRANCH == "develop" || $CI_PIPELINE_SOURCE == "schedule")
- if: ($CI_COMMIT_BRANCH =~ /^release\/.*$/ || $CI_COMMIT_BRANCH == "develop" || $CI_PIPELINE_SOURCE == "schedule" || $SCAN_CONTAINERS == "true")
{% if FILE_LIMITS %}changes:
{% for FILE in files %}- {{ FILE }}
{% endfor %}{% for FILE in IMAGE.changeFiles %}- {{ FILE }}