diff --git a/.drone.yml b/.drone.yml index b3109d2..2b533ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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."