Files
hemhub-web/.drone.yml
Urban Modig ac2491f3c5
Some checks failed
continuous-integration/drone/push Build is failing
fix pipeline
2025-10-12 21:09:04 +02:00

58 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: build-test-and-push
trigger:
event:
- push
branch:
- main
steps:
- name: checks
image: node:20-alpine
environment:
PNPM_HOME: /root/.local/share/pnpm
commands:
- corepack enable
- corepack prepare pnpm@9.12.0 --activate
- pnpm install --frozen-lockfile
- pnpm lint
- pnpm typecheck
- pnpm test -- --run
- name: docker_build_push
image: plugins/docker:latest
depends_on:
- checks
settings:
context: .
dockerfile: Dockerfile
# Registry och repo
registry: rubble.se:5000
repo: rubble.se:5000/urban/hemhub-web
# Inloggning (lägg in som secrets i Drone)
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
# Build args → styr Vite och proxybas
build_args:
- VITE_API_BASE_URL=https://rubble.se/hemhub/api
- VITE_BASE_PATH=/hemhub/app
# Taggar (latest + kort SHA)
tags:
- latest
- ${DRONE_COMMIT_SHA:0:7}
# Sätt till false/ta bort om registret har TLS
insecure: true
environment:
VITE_API_BASE_URL:
from_secret: VITE_API_BASE_URL