refactor: Update Woodpecker CI config and StorageHierarchy component

This commit is contained in:
garionion 2025-03-02 11:47:10 +01:00
parent 6400eb9513
commit d652903734
2 changed files with 29 additions and 25 deletions

View file

@ -1,14 +1,15 @@
pipeline:
variables:
- &golang_image 'golang:1.24'
steps:
backend-lint:
image: golang:1.21
group: lint
image: *golang_image
commands:
- go vet ./...
- go fmt ./...
frontend-lint:
image: node:20
group: lint
commands:
- cd web
- npm ci
@ -20,18 +21,19 @@ pipeline:
- cd web
- npm ci
- npm run build
when:
status: [success]
depends_on:
- frontend-lint
backend-build:
image: golang:1.21
image: *golang_image
commands:
- go mod download
- go generate ./...
# Build with embedded frontend
- go build -o inventory -ldflags="-s -w" .
when:
status: [success]
depends_on:
- frontend-build
- backend-lint
# Create artifacts
artifacts:
@ -40,8 +42,8 @@ pipeline:
- mkdir -p artifacts
- cp inventory artifacts/
- tar -czvf artifacts/inventory.tar.gz inventory
when:
status: [success]
depends_on:
- backend-build
# Optional step for creating a Docker image
docker-build:
@ -52,7 +54,9 @@ pipeline:
- latest
- ${DRONE_TAG##v}
dockerfile: Dockerfile
depends_on:
- backend-lint
- frontend-lint
when:
branch: main
event: [push, tag]
status: [success]

View file

@ -7,7 +7,7 @@
<v-select
v-model="selectedStorageId"
:items="storageSpaces"
item-title="location"
item-title="name"
item-value="id"
label="Select Storage Space"
density="compact"