fix(): Builds the container to scan
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Elia el Lazkani 2023-07-03 00:14:46 +02:00
parent edc81c840a
commit ebf56ec026

View file

@ -50,8 +50,10 @@ steps:
- name: dockersock - name: dockersock
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- docker build -t "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" .
- trivy image --exit-code 0 "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" - trivy image --exit-code 0 "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}"
- trivy image --exit-code 1 --severity CRITICAL "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}" - trivy image --exit-code 1 --severity CRITICAL "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}"
- docker rmi "scm.project42.io/elia/blog:${DRONE_COMMIT_SHA:0:8}"
depends_on: depends_on:
- test-build-container - test-build-container