chore(): Testing the command directly
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
Elia el Lazkani 2024-01-20 01:11:33 +01:00
parent 1952265a14
commit 1dca3be12d
2 changed files with 1 additions and 3 deletions

View file

@ -41,8 +41,7 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: registry_password from_secret: registry_password
commands: commands:
- quick-scan -i scm.project42.io/elia/tricks -t "${DRONE_COMMIT_SHA:0:8}" - trivy image --image-src remote --exit-code 0 --username "$REGISTRY_USERNAME" --password "$REGISTRY_PASSWORD" "scm.project42.io/elia/tricks:${DRONE_COMMIT_SHA:0:8}"
depends_on: depends_on:
- build - build

View file

@ -90,7 +90,6 @@ class Trivy:
cmd = f"{base} {suffix}" cmd = f"{base} {suffix}"
if extra_vars: if extra_vars:
cmd = f"{base} {extra_vars} {suffix}" cmd = f"{base} {extra_vars} {suffix}"
print(cmd)
cmd_result = subprocess.run(cmd.split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE) cmd_result = subprocess.run(cmd.split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return cmd_result.stdout.decode("utf-8"), cmd_result.returncode return cmd_result.stdout.decode("utf-8"), cmd_result.returncode