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