Fixed yaml code paste error
This commit is contained in:
51
.drone.yml
51
.drone.yml
@@ -4,17 +4,9 @@ type: kubernetes
|
||||
name: build
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
disable: false
|
||||
|
||||
steps:
|
||||
- name: git clone
|
||||
image: drone/git
|
||||
environment:
|
||||
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
|
||||
commands:
|
||||
- git clone $REPO_URL .
|
||||
- git checkout $DRONE_COMMIT
|
||||
|
||||
- name: dotnet restore
|
||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||
commands:
|
||||
@@ -30,7 +22,6 @@ steps:
|
||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||
commands:
|
||||
- dotnet test --configuration Release
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@@ -43,14 +34,6 @@ clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: git clone
|
||||
image: drone/git
|
||||
environment:
|
||||
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
|
||||
commands:
|
||||
- git clone $REPO_URL .
|
||||
- git checkout $DRONE_COMMIT
|
||||
|
||||
- name: dotnet publish
|
||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||
commands:
|
||||
@@ -70,7 +53,6 @@ steps:
|
||||
from_secret: registry-password
|
||||
dockerfile: Dockerfile
|
||||
context: ./SampleApi/bin/Release/net8.0/publish/
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@@ -83,22 +65,17 @@ clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: git clone
|
||||
image: drone/git
|
||||
environment:
|
||||
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
|
||||
commands:
|
||||
- git clone $REPO_URL .
|
||||
- git checkout $DRONE_COMMIT
|
||||
|
||||
- name: deploy
|
||||
image: danielgormly/drone-plugin-kube:0.0.1
|
||||
- name: deploy via SSH
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
serviceAccountName: droneci-sa
|
||||
template: ./manifests/deploy.yml
|
||||
namespace: sampleapi
|
||||
ca:
|
||||
from_secret: k8s-cert
|
||||
server: https://lead.mngoma.lab:6443
|
||||
token:
|
||||
from_secret: k8s-token
|
||||
host: lead.mngoma.lab
|
||||
username:
|
||||
from_secret: host-username
|
||||
password:
|
||||
from_secret: host-password
|
||||
port: 22
|
||||
script:
|
||||
- set -euo pipefail
|
||||
- echo "Applying Kubernetes manifest via SSH..."
|
||||
- cat ./manifests/deploy.yml | kubectl apply -f -
|
||||
- echo "Manifest applied successfully."
|
||||
|
||||
Reference in New Issue
Block a user