refactor: Update Woodpecker CI config and StorageHierarchy component
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

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

View file

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

View file

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