From d6ac68f7d3a99d5a492849ae73f3f40ebb3dff96 Mon Sep 17 00:00:00 2001 From: Scott Hatlen Date: Wed, 5 Nov 2025 09:13:03 -0800 Subject: [PATCH] not building for pis anymore --- .woodpecker.yaml | 52 +++++++++++++++++++++++++++++++++++++++++ scripts/build-images.sh | 4 ++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .woodpecker.yaml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..218b3fb --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,52 @@ +when: + event: push + branch: main + +steps: + - name: build-and-push-backend + image: woodpeckerci/plugin-docker-buildx:4.2.0 + privileged: true + settings: + repo: harbor.scottyah.com/bestofpb/pb-backend + dockerfile: backend/Dockerfile + context: backend + platforms: linux/amd64 + tags: + - latest + - ${CI_COMMIT_SHA:0:8} + logins: + - registry: https://harbor.scottyah.com + username: + from_secret: harbor_username + password: + from_secret: harbor_password + + - name: build-and-push-frontend + image: woodpeckerci/plugin-docker-buildx:4.2.0 + privileged: true + settings: + repo: harbor.scottyah.com/bestofpb/pb-frontend + dockerfile: frontend/Dockerfile + context: frontend + platforms: linux/amd64 + 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 + backend_options: + kubernetes: + serviceAccountName: woodpecker-deploy + commands: + - kubectl apply -f k8s.yaml -n bestofpb + - kubectl rollout restart deployment/pb-backend -n bestofpb + - kubectl rollout restart deployment/pb-frontend -n bestofpb + - kubectl rollout status deployment/pb-backend -n bestofpb + - kubectl rollout status deployment/pb-frontend -n bestofpb diff --git a/scripts/build-images.sh b/scripts/build-images.sh index 3c21008..e9023f2 100755 --- a/scripts/build-images.sh +++ b/scripts/build-images.sh @@ -40,11 +40,11 @@ fi # Build backend image echo "Building backend image..." -podman build --platform=linux/arm64 -t ${HARBOR_REGISTRY}/pb-backend:$VERSION ./backend +podman build -t ${HARBOR_REGISTRY}/pb-backend:$VERSION ./backend podman tag ${HARBOR_REGISTRY}/pb-backend:$VERSION ${HARBOR_REGISTRY}/pb-backend:latest echo "Building frontend image..." -podman build --platform=linux/arm64 -t ${HARBOR_REGISTRY}/pb-frontend:$VERSION ./frontend +podman build -t ${HARBOR_REGISTRY}/pb-frontend:$VERSION ./frontend podman tag ${HARBOR_REGISTRY}/pb-frontend:$VERSION ${HARBOR_REGISTRY}/pb-frontend:latest echo "\nBuild complete. Images:"