lure-web-old/.woodpecker.yml

49 lines
1.8 KiB
YAML

platform: linux/amd64
steps:
build-frontend:
image: gitea.elara.ws/elara6331/node
directory: frontend
environment:
- LURE_WEB_API_URL=https://api.lure.sh
commands:
- npm i
- npm run build
- mkdir app
- mv node_modules build package.json app
- tar czf app.tar.gz app/
publish-frontend:
image: gitea.elara.ws/elara6331/crane
secrets: [ registry_password ]
directory: frontend
commands:
- export HOME=/home/nonroot
- crane auth login gitea.elara.ws -u Elara6331 -p "$${REGISTRY_PASSWORD}"
- crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/lure/frontend:amd64 --platform=linux/amd64
- crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/lure/frontend:arm64 --platform=linux/arm64
- crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/lure/frontend:riscv64 --platform=linux/riscv64
- crane index append -m gitea.elara.ws/lure/frontend:amd64 -m gitea.elara.ws/lure/frontend:arm64 -m gitea.elara.ws/lure/frontend:riscv64 -t gitea.elara.ws/lure/frontend:latest
build-backend:
image: gitea.elara.ws/elara6331/builder
secrets: [ registry_password ]
directory: backend
commands:
- registry-login
- ko build -B --platform=linux/amd64,linux/arm64,linux/riscv64 --sbom=none
environment:
- REGISTRY=gitea.elara.ws
- REGISTRY_USERNAME=Elara6331
- KO_DOCKER_REPO=gitea.elara.ws/lure
- KO_DEFAULTBASEIMAGE=gitea.elara.ws/elara6331/static
deploy:
image: loq9/drone-nomad
secrets: [lure_api_github_secret]
settings:
addr: http://192.168.100.62:4646
template: template.nomad
environment:
- PLUGIN_WATCH_DEPLOYMENT=true
- PLUGIN_WATCH_DEPLOYMENT_TIMEOUT=10m