This commit is contained in:
18
.drone.yml
18
.drone.yml
@@ -14,7 +14,7 @@ steps:
|
|||||||
- name: checkout
|
- name: checkout
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
commands:
|
commands:
|
||||||
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
- git clone https://gitea.khongisa.co.za/khwezi/blazortest.git
|
||||||
- git checkout ${DRONE_COMMIT}
|
- git checkout ${DRONE_COMMIT}
|
||||||
|
|
||||||
- name: dotnet build
|
- name: dotnet build
|
||||||
@@ -54,7 +54,7 @@ steps:
|
|||||||
- name: checkout
|
- name: checkout
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
commands:
|
commands:
|
||||||
- git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git .
|
- git clone https://gitea.khongisa.co.za/khwezi/blazortest.git .
|
||||||
- git checkout ${DRONE_COMMIT}
|
- git checkout ${DRONE_COMMIT}
|
||||||
|
|
||||||
- name: dotnet publish
|
- name: dotnet publish
|
||||||
@@ -74,13 +74,13 @@ steps:
|
|||||||
--verbosity=debug
|
--verbosity=debug
|
||||||
--context=.
|
--context=.
|
||||||
--dockerfile=Dockerfile
|
--dockerfile=Dockerfile
|
||||||
--destination=index.docker.io/khwezi/webapitest:latest
|
--destination=index.docker.io/khwezi/blazortest:latest
|
||||||
--destination=index.docker.io/khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
--destination=index.docker.io/khwezi/blazortest:${DRONE_BUILD_NUMBER}
|
||||||
|
|
||||||
- name: volnerability scan
|
- name: volnerability scan
|
||||||
image: aquasec/trivy
|
image: aquasec/trivy
|
||||||
commands:
|
commands:
|
||||||
- trivy image --exit-code 1 --timeout 15m --severity CRITICAL khwezi/webapitest:${DRONE_BUILD_NUMBER}
|
- trivy image --exit-code 1 --timeout 15m --severity CRITICAL khwezi/blazortest:${DRONE_BUILD_NUMBER}
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
@@ -106,7 +106,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: ssh_password
|
from_secret: ssh_password
|
||||||
script:
|
script:
|
||||||
- docker pull khwezi/webapitest:latest
|
- docker pull khwezi/blazortest:latest
|
||||||
- docker stop webapi 2>NUL || echo "Container not running"
|
- docker stop blazortest 2>NUL || echo "Container not running"
|
||||||
- docker rm webapi 2>NUL || echo "Container not found"
|
- docker rm blazortest 2>NUL || echo "Container not found"
|
||||||
- docker run -d --name webapi --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Development -p 4000:8081 khwezi/webapitest:latest
|
- docker run -d --name blazortest --restart unless-stopped -e ASPNETCORE_ENVIRONMENT=Development -p 4000:8081 khwezi/blazortest:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user