not building for pis anymore
This commit is contained in:
52
.woodpecker.yaml
Normal file
52
.woodpecker.yaml
Normal file
@@ -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
|
||||||
@@ -40,11 +40,11 @@ fi
|
|||||||
|
|
||||||
# Build backend image
|
# Build backend image
|
||||||
echo "Building 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
|
podman tag ${HARBOR_REGISTRY}/pb-backend:$VERSION ${HARBOR_REGISTRY}/pb-backend:latest
|
||||||
|
|
||||||
echo "Building frontend image..."
|
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
|
podman tag ${HARBOR_REGISTRY}/pb-frontend:$VERSION ${HARBOR_REGISTRY}/pb-frontend:latest
|
||||||
|
|
||||||
echo "\nBuild complete. Images:"
|
echo "\nBuild complete. Images:"
|
||||||
|
|||||||
Reference in New Issue
Block a user