From 5a85b0f7658144a9fbd0cfa76b29f37102900ade Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Sat, 20 Jan 2024 01:21:37 +0100 Subject: [PATCH] chore(): No report scan - Tags the image with the specific version - Removes the report pushing from the trivy scan --- .drone.yml | 21 ++------------------- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8b79e84..f7eced9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,22 +27,6 @@ steps: depends_on: - generate-blog -- name: test-build-container - image: plugins/docker - settings: - registry: scm.project42.io - username: - from_secret: registry_username - password: - from_secret: registry_password - repo: scm.project42.io/elia/blog - dry_run: true - squash: true - tags: - - "${DRONE_COMMIT_SHA:0:8}" - depends_on: - - clean-up-images - - name: build-container image: plugins/docker settings: @@ -57,7 +41,7 @@ steps: tags: - "${DRONE_COMMIT_SHA:0:8}" depends_on: - - test-build-container + - clean-up-images when: event: exclude: @@ -71,7 +55,7 @@ steps: REGISTRY_PASSWORD: from_secret: registry_password commands: - - generate-scan-report -i scm.project42.io/elia/blog -t "${DRONE_COMMIT_SHA:0:8}" -g "${DRONE_COMMIT_SHA:0:8}" + - trivy image --image-src remote --exit-code 0 --username "$REGISTRY_USERNAME" --password "$REGISTRY_PASSWORD" "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" depends_on: - build-container when: @@ -87,7 +71,6 @@ steps: REGISTRY_PASSWORD: from_secret: registry_password commands: - - 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 diff --git a/Dockerfile b/Dockerfile index 5aadf20..d57c21a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginxinc/nginx-unprivileged:alpine +FROM nginxinc/nginx-unprivileged:1.25.3-alpine3.18 MAINTAINER Elia el Lazkani COPY public/ /usr/share/nginx/html/blog/ -- 2.45.2