Refactored pipeline to fix the ssl validation issue
This commit is contained in:
13
.drone.yml
13
.drone.yml
@@ -7,6 +7,12 @@ clone:
|
|||||||
disable: false
|
disable: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: git ssl fix
|
||||||
|
image: drone/git
|
||||||
|
commands:
|
||||||
|
# Disable SSL verification for self-signed Gitea cert
|
||||||
|
- git config --global http.sslVerify false
|
||||||
|
|
||||||
- name: dotnet restore
|
- name: dotnet restore
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
commands:
|
commands:
|
||||||
@@ -22,6 +28,7 @@ steps:
|
|||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet test --configuration Release
|
- dotnet test --configuration Release
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@@ -53,6 +60,7 @@ steps:
|
|||||||
from_secret: registry-password
|
from_secret: registry-password
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: ./SampleApi/bin/Release/net8.0/publish/
|
context: ./SampleApi/bin/Release/net8.0/publish/
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@@ -77,5 +85,8 @@ steps:
|
|||||||
script:
|
script:
|
||||||
- set -euo pipefail
|
- set -euo pipefail
|
||||||
- echo "Applying Kubernetes manifest via SSH..."
|
- echo "Applying Kubernetes manifest via SSH..."
|
||||||
- cat ./manifests/deploy.yml | kubectl apply -f -
|
# Apply the manifest remotely via kubectl on the host
|
||||||
|
- ssh -o StrictHostKeyChecking=no $DRONE_REMOTE_USER@lead.mngoma.lab 'kubectl apply -f -' <<'EOF'
|
||||||
|
$(cat ./manifests/deploy.yml)
|
||||||
|
EOF
|
||||||
- echo "Manifest applied successfully."
|
- echo "Manifest applied successfully."
|
||||||
|
|||||||
Reference in New Issue
Block a user