From 720c8e29ea294db0beab25404f82db26b3f5305b Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Wed, 5 Jul 2023 23:53:11 +0200 Subject: [PATCH] chore(): Migrates pipeline to using the latest tricks features --- .drone.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index dcb6a18..e4a6381 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,8 +61,13 @@ steps: - name: trivy-scan image: scm.project42.io/elia/tricks:latest + environment: + REGISTRY_USERNAME: + from_secret: registry_username + REGISTRY_PASSWORD: + from_secret: registry_password commands: - - trivy image --image-src remote "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" + - generate-scan-report -i scm.project42.io/elia/blog -t "${DRONE_COMMIT_SHA:0:8}" -g "${DRONE_COMMIT_SHA:0:8}" depends_on: - build-container @@ -74,7 +79,8 @@ steps: REGISTRY_PASSWORD: from_secret: registry_password commands: - - oras cp --from-username "$REGISTRY_USERNAME" --from-password "$REGISTRY_PASSWORD" --to-username "$REGISTRY_USERNAME" --to-password "$REGISTRY_PASSWORD" "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" scm.project42.io/elia/blog:latest + - check-scan-report -i scm.project42.io/elia/blog -t "${DRONE_COMMIT_SHA:0:8}" + - oras tag --username "$REGISTRY_USERNAME" --password "$REGISTRY_PASSWORD" "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" latest depends_on: - trivy-scan when: