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: