2023-08-10 04:12:29 +00:00
|
|
|
platform: linux/amd64
|
|
|
|
steps:
|
2023-09-22 23:22:50 +00:00
|
|
|
build-frontend:
|
2023-08-16 19:00:43 +00:00
|
|
|
image: gitea.elara.ws/elara6331/node
|
|
|
|
environment:
|
|
|
|
- LURE_WEB_API_URL=https://api.lure.elara.ws
|
|
|
|
commands:
|
|
|
|
- npm i
|
|
|
|
- npm run build
|
2023-08-16 19:48:12 +00:00
|
|
|
- mkdir app
|
|
|
|
- mv node_modules build package.json app
|
2023-08-16 19:00:43 +00:00
|
|
|
- tar czf app.tar.gz app/
|
2023-09-22 23:22:50 +00:00
|
|
|
|
|
|
|
publish-frontend:
|
2023-08-16 19:26:50 +00:00
|
|
|
image: gitea.elara.ws/elara6331/crane
|
2023-08-16 19:00:43 +00:00
|
|
|
secrets: [ registry_password ]
|
|
|
|
commands:
|
2023-08-16 19:38:46 +00:00
|
|
|
- export HOME=/home/nonroot
|
2023-08-16 19:00:43 +00:00
|
|
|
- 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/elara6331/lure-web:amd64 --platform=linux/amd64
|
|
|
|
- crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/elara6331/lure-web:arm64 --platform=linux/arm64
|
|
|
|
- crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/elara6331/lure-web:riscv64 --platform=linux/riscv64
|
2023-08-16 19:40:09 +00:00
|
|
|
- crane index append -m gitea.elara.ws/elara6331/lure-web:amd64 -m gitea.elara.ws/elara6331/lure-web:arm64 -m gitea.elara.ws/elara6331/lure-web:riscv64 -t gitea.elara.ws/elara6331/lure-web:latest
|
2023-08-16 19:00:43 +00:00
|
|
|
|
2023-09-22 23:22:50 +00:00
|
|
|
build-backend:
|
|
|
|
image: gitea.elara.ws/elara6331/builder
|
|
|
|
secrets: [ registry_password ]
|
|
|
|
directory: lure-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/elara6331
|
|
|
|
- KO_DEFAULTBASEIMAGE=gitea.elara.ws/elara6331/static
|
|
|
|
|
2023-05-04 22:10:09 +00:00
|
|
|
deploy:
|
2023-05-16 19:43:11 +00:00
|
|
|
image: loq9/drone-nomad
|
2023-05-04 22:14:01 +00:00
|
|
|
secrets: [lure_api_github_secret]
|
2023-05-04 22:10:09 +00:00
|
|
|
settings:
|
|
|
|
addr: http://192.168.100.62:4646
|
|
|
|
template: template.nomad
|
|
|
|
environment:
|
|
|
|
- PLUGIN_WATCH_DEPLOYMENT=true
|
2023-05-04 22:11:44 +00:00
|
|
|
- PLUGIN_WATCH_DEPLOYMENT_TIMEOUT=10m
|