Build without docker in docker
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Elara 2023-08-16 12:00:43 -07:00
parent c2dec3db36
commit bd9a6c09ea
7 changed files with 23 additions and 30 deletions

View File

@ -1,6 +1,7 @@
.DS_Store
node_modules
/build
/app
/.svelte-kit
/package
.env

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.DS_Store
node_modules
/build
/app
/.svelte-kit
/package
.env

View File

@ -1,6 +1,7 @@
.DS_Store
node_modules
/build
/app
/.svelte-kit
/package
.env

View File

@ -1,18 +1,24 @@
platform: linux/amd64
steps:
build:
image: gitea.elara.ws/elara6331/node
environment:
- LURE_WEB_API_URL=https://api.lure.elara.ws
commands:
- npm i
- npm run build
- tar czf app.tar.gz app/
publish:
image: woodpeckerci/plugin-docker-buildx
secrets: [docker_username, docker_password]
settings:
repo: elara6331/lure-web
dockerfile: docker/Dockerfile
platforms: linux/amd64,linux/arm64
build_args: api_url=https://api.lure.elara.ws
tag: latest
when:
branch: public
event: push
image: gcr.io/go-containerregistry/crane
secrets: [ registry_password ]
commands:
- 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
- crane index -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
deploy:
image: loq9/drone-nomad
secrets: [lure_api_github_secret]
@ -22,6 +28,3 @@ steps:
environment:
- PLUGIN_WATCH_DEPLOYMENT=true
- PLUGIN_WATCH_DEPLOYMENT_TIMEOUT=10m
when:
branch: public
event: push

View File

@ -1,13 +0,0 @@
FROM node:19-alpine
ARG api_url
ENV LURE_WEB_API_URL $api_url
RUN apk add git
RUN git clone https://gitea.elara.ws/Elara6331/lure-web
RUN cd lure-web && \
npm i && \
npm run build
WORKDIR /lure-web
ENTRYPOINT node build

View File

@ -16,7 +16,7 @@ const config = {
],
kit: {
adapter: adapter(),
adapter: adapter({out: 'app',}),
env: {
publicPrefix: "LURE_WEB_"
},

View File

@ -52,7 +52,7 @@ job "lure-web" {
driver = "docker"
config {
image = "elara6331/lure-web:latest"
image = "gitea.elara.ws/elara6331/lure-web:latest"
ports = ["http"]
}