Simplify skipping of scans

Scans are now only skipped if the SKIP_SCANS=yes.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2021-12-03 14:39:05 +01:00
parent 0ac288e6dd
commit 39d2ff06fa

View File

@ -106,13 +106,9 @@ image-packaging:
variables: variables:
IMAGE: "${CI_REGISTRY_IMAGE}/container-toolkit:${CI_COMMIT_SHORT_SHA}-${DIST}" IMAGE: "${CI_REGISTRY_IMAGE}/container-toolkit:${CI_COMMIT_SHORT_SHA}-${DIST}"
IMAGE_ARCHIVE: "container-toolkit.tar" IMAGE_ARCHIVE: "container-toolkit.tar"
rules: except:
- if: $CI_COMMIT_MESSAGE =~ /\[skip[ _-]scans?\]/i variables:
when: never - $SKIP_SCANS && $SKIP_SCANS == "yes"
- if: $SKIP_SCANS
when: never
- if: $CI_COMMIT_TAG == null && $CI_COMMIT_BRANCH != $RELEASE_DEVEL_BRANCH
allow_failure: true
before_script: before_script:
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}" - docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
# TODO: We should specify the architecture here and scan all architectures # TODO: We should specify the architecture here and scan all architectures