From c0cbf0b43a930c466216a5f731190308b07e66d1 Mon Sep 17 00:00:00 2001 From: Scott Hatlen Date: Mon, 20 Oct 2025 20:51:07 -0700 Subject: [PATCH] Refactor Woodpecker CI pipeline to use buildx plugin correctly --- .woodpecker.yml | 22 +++++++++++++--------- k8s.yaml | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 01dc4fb..a98bf89 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,25 +3,29 @@ when: branch: main steps: - - name: build - image: woodpeckerci/plugin-docker-buildx + - name: build-and-push + image: woodpeckerci/plugin-docker-buildx:4.2.0 + privileged: true settings: - registry: harbor.scottyah.com repo: harbor.scottyah.com/scottyah/blog - tags: latest dockerfile: Dockerfile context: . platforms: linux/amd64 - insecure: true - username: - from_secret: harbor_username - password: - from_secret: harbor_password + tags: + - latest + - ${CI_COMMIT_SHA:0:8} + logins: + - registry: https://harbor.scottyah.com + username: + from_secret: harbor_username + password: + from_secret: harbor_password - name: deploy image: bitnami/kubectl:latest commands: - kubectl apply -f k8s.yaml -n blog + - kubectl rollout restart deployment/blog-dep -n blog - kubectl rollout status deployment/blog-dep -n blog environment: KUBECONFIG: diff --git a/k8s.yaml b/k8s.yaml index 22a3fa4..d758d00 100644 --- a/k8s.yaml +++ b/k8s.yaml @@ -50,7 +50,7 @@ spec: tls: - hosts: - scottyah.com - secretName: blog-tls-cert + secretName: scottyah-tls rules: - host: scottyah.com http: