Skip to content
Snippets Groups Projects
Verified Commit ad8a0471 authored by Virgile Gerecke's avatar Virgile Gerecke :metal:
Browse files

:construction_worker: Switch CI to template

parent 17a61082
Branches
2 merge requests!3Develop,!2👷 Switch CI to template
Pipeline #78408 passed with stages
in 1 minute and 22 seconds
......@@ -7,48 +7,5 @@ variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY/docker/python3.9-ci:$CI_COMMIT_REF_NAME
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY/docker/python3.9-ci:latest
scan image:
stage: scan
image:
name: aquasec/trivy
entrypoint: [""]
script:
- trivy image --ignore-unfixed --format template --template "@/contrib/html.tpl" -o report.html $CONTAINER_TEST_IMAGE
cache:
key: trivy-cache
paths:
- .cache
artifacts:
name: "Container Scan Report ${CI_COMMIT_SHA}"
paths:
- report.html
expire_in: 7 days
when: on_failure
.build-image:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${DESTINATION}"
b:docker:
extends: .build-image
stage: build
variables:
DESTINATION: $CONTAINER_TEST_IMAGE
r:docker:
extends: .build-image
stage: release
variables:
DESTINATION: $CONTAINER_RELEASE_IMAGE
only:
- master
include:
- remote: https://git.unistra.fr/docker/template/-/raw/main/scan.gitlab-ci.yml
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