Compare commits

...

4 Commits

Author SHA1 Message Date
2acbf51413 Merge pull request 'test' (#90) from test into main
Some checks failed
continuous-integration/drone Build encountered an error
Reviewed-on: #90
2026-04-04 15:33:27 +02:00
b46848dd56 Refactored the pipeline to pull the trivy image from nexus as well 2026-04-04 15:33:03 +02:00
30e0bc2b87 Pulling .net docker image from nexus 2026-04-04 15:32:20 +02:00
903c17e7f8 Refactored the pipeline so that docker push happens before the trivy scan 2026-04-04 15:30:56 +02:00

View File

@@ -8,7 +8,7 @@ clone:
steps: steps:
- name: build-test-publish - name: build-test-publish
image: mcr.microsoft.com/dotnet/sdk:10.0 image: nexus.khongisa.co.za/mcr.microsoft.com/dotnet/sdk:10.0
commands: commands:
- dotnet restore --source https://nexus.khongisa.co.za/repository/nuget-group/index.json --no-cache - dotnet restore --source https://nexus.khongisa.co.za/repository/nuget-group/index.json --no-cache
- dotnet build --configuration Release --no-restore - dotnet build --configuration Release --no-restore
@@ -31,17 +31,6 @@ steps:
dry_run: true dry_run: true
# Set to false once you verify the scan passes, or see the step below # Set to false once you verify the scan passes, or see the step below
- name: vulnerability-scan
image: aquasec/trivy:0.50.1
environment:
# Trivy needs these to pull the image from your Nexus to scan it
TRIVY_USERNAME:
from_secret: docker_username
TRIVY_PASSWORD:
from_secret: docker_password
commands:
- trivy image --exit-code 1 --severity CRITICAL nexus.khongisa.co.za/webapitest:${DRONE_BUILD_NUMBER}
- name: docker-push - name: docker-push
image: plugins/docker image: plugins/docker
settings: settings:
@@ -53,6 +42,17 @@ steps:
password: password:
from_secret: docker_password from_secret: docker_password
- name: vulnerability-scan
image: nexus.khongisa.co.za/aquasec/trivy:0.50.1
environment:
# Trivy needs these to pull the image from your Nexus to scan it
TRIVY_USERNAME:
from_secret: docker_username
TRIVY_PASSWORD:
from_secret: docker_password
commands:
- trivy image --exit-code 1 --severity CRITICAL nexus.khongisa.co.za/webapitest:${DRONE_BUILD_NUMBER}
# --- DEPLOY STAGE --- # --- DEPLOY STAGE ---
- name: deploy-uat - name: deploy-uat
image: appleboy/drone-ssh image: appleboy/drone-ssh