Merge pull request 'Enhanced triggers' (#98) from test into main

Reviewed-on: #98
This commit was merged in pull request #98.
This commit is contained in:
2026-04-04 16:18:08 +02:00

View File

@@ -1,10 +1,8 @@
---
kind: pipeline
type: docker
name: build-and-package
clone:
depth: 1
steps:
- name: build-test-publish
image: nexus.khongisa.co.za/sdk:10.0
@@ -14,41 +12,28 @@ steps:
- dotnet test --configuration Release --no-build
- dotnet publish --configuration Release --no-build
- name: docker-build
- name: docker-build-and-push
image: plugins/docker
settings:
registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/webapitest
tags: [ "${DRONE_BUILD_NUMBER}", "latest" ]
username:
from_secret: docker_username
password:
from_secret: docker_password
dry_run: true
- name: docker-push
image: plugins/docker
settings:
registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/webapitest
tags: [ "${DRONE_BUILD_NUMBER}", "latest" ]
username:
from_secret: docker_username
password:
from_secret: docker_password
username: { from_secret: docker_username }
password: { from_secret: docker_password }
- name: vulnerability-scan
image: aquasec/trivy:0.50.1
environment:
TRIVY_USERNAME:
from_secret: docker_username
TRIVY_PASSWORD:
from_secret: docker_password
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}
- trivy image --image-src remote --exit-code 1 --severity CRITICAL nexus.khongisa.co.za/webapitest:${DRONE_BUILD_NUMBER}
trigger:
event:
- push
branch:
- main
---
kind: pipeline