CD Update
Some checks failed
CI Pipeline for the Go API / Go Vet (basic static check) (push) Successful in 7s
CI Pipeline for the Go API / Docker Image Build Test (push) Successful in 15s
CI Pipeline for the Go API / Kubernetes Smoke Test (push) Successful in 5s
CI Pipeline for the Go API / Go Build & Cross-Compile (push) Successful in 14s
CI Pipeline for the Go API / Kubernetes Deployment (push) Has been cancelled
Some checks failed
CI Pipeline for the Go API / Go Vet (basic static check) (push) Successful in 7s
CI Pipeline for the Go API / Docker Image Build Test (push) Successful in 15s
CI Pipeline for the Go API / Kubernetes Smoke Test (push) Successful in 5s
CI Pipeline for the Go API / Go Build & Cross-Compile (push) Successful in 14s
CI Pipeline for the Go API / Kubernetes Deployment (push) Has been cancelled
This commit is contained in:
@@ -78,3 +78,31 @@ jobs:
|
||||
|
||||
- name: K3S Cluster Connection Test
|
||||
run: kubectl get nodes -o wide
|
||||
|
||||
k8s-deploy:
|
||||
name: Kubernetes Deployment
|
||||
runs-on: docker-latest
|
||||
needs: [go-build, k8s-some-test]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure kubeconfig
|
||||
run: |
|
||||
mkdir -p ~/.kube
|
||||
echo "$KUBECONFIG_GITEA" > ~/.kube/config
|
||||
chmod 600 ~/.kube/config
|
||||
env:
|
||||
KUBECONFIG_GITEA: ${{ secrets.KUBECONFIG_GITEA }}
|
||||
|
||||
- name: Verify connection
|
||||
run: kubectl get nodes -o wide
|
||||
|
||||
- name: Apply Deployment to Cluster
|
||||
run: kubectl apply -f k8s/service.yaml
|
||||
|
||||
- name: Apply Service to Cluster
|
||||
run: kubectl apply -f k8s/deployment.yaml
|
||||
|
||||
- name: Verify rollout
|
||||
run: kubectl rollout status deployment/go-api
|
||||
|
||||
Reference in New Issue
Block a user