Refactored pipeline to fix the ssl validation issue

This commit is contained in:
Khwezi
2025-10-18 14:34:31 +02:00
parent d4b20fae41
commit 2099acd066

View File

@@ -7,6 +7,12 @@ clone:
disable: false
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
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
@@ -22,6 +28,7 @@ steps:
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet test --configuration Release
---
kind: pipeline
type: kubernetes
@@ -53,6 +60,7 @@ steps:
from_secret: registry-password
dockerfile: Dockerfile
context: ./SampleApi/bin/Release/net8.0/publish/
---
kind: pipeline
type: kubernetes
@@ -77,5 +85,8 @@ steps:
script:
- set -euo pipefail
- 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."