diff --git a/.drone.yml b/.drone.yml index 698ce24..138bb33 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ --- kind: pipeline -name: test +name: build steps: - name: test-build-container @@ -33,7 +33,6 @@ steps: squash: true compress: true tags: - - pre-scan - "${DRONE_COMMIT_SHA:0:8}" depends_on: - test-build-container @@ -49,12 +48,12 @@ name: scan steps: - name: trivy-scan - image: scm.project42.io/elia/tricks:production + image: scm.project42.io/elia/tricks:latest commands: - trivy image --image-src remote scm.project42.io/elia/tricks:"${DRONE_COMMIT_SHA:0:8}" depends_on: - - test + - build trigger: exclude: @@ -63,18 +62,18 @@ trigger: --- kind: pipeline -name: build +name: deploy steps: - name: promote-container - image: scm.project42.io/elia/tricks:production + image: scm.project42.io/elia/tricks:latest environment: REGISTRY_USERNAME: from_secret: registry_username 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/tricks:${DRONE_COMMIT_SHA:0:8}" scm.project42.io/elia/tricks:production + - oras cp --from-username "$REGISTRY_USERNAME" --from-password "$REGISTRY_PASSWORD" --to-username "$REGISTRY_USERNAME" --to-password "$REGISTRY_PASSWORD" "scm.project42.io/elia/tricks:${DRONE_COMMIT_SHA:0:8}" scm.project42.io/elia/tricks:latest when: event: - promote