From e3f778db279c1166359d42459a236d66c35916d7 Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Mon, 3 Jul 2023 23:05:03 +0200 Subject: [PATCH] chore(): Migrates promotion to renaming --- .drone.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7f73f87..3f3d6f9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,22 +49,15 @@ kind: pipeline name: build steps: -- name: build-container - image: plugins/docker - settings: - registry: scm.project42.io - dockerfile: Dockerfile - username: +- name: retag-container + image: ghcr.io/oras-project/oras:v1.0.0 + environment: + REGISTRY_USERNAME: from_secret: registry_username - password: + REGISTRY_PASSWORD: from_secret: registry_password - repo: scm.project42.io/elia/trivy - dry_run: false - squash: true - compress: true - tags: - - production - - "${DRONE_COMMIT_SHA:0:8}" + commands: + - oras cp --from-username "$REGISTRY_USERNAME" --from-password "$REGISTRY_PASSWORD" --to-username "$REGISTRY_USERNAME" --to-password "$REGISTRY_PASSWORD" "scm.project42.io/elia/trivy:${DRONE_COMMIT_SHA:0:8}" scm.project42.io/elia/trivy:production when: event: - promote