Files
hemhub-web/.drone.yml
Urban Modig 1b74650aa2
Some checks reported errors
continuous-integration/drone Build encountered an error
Dockerfile upd drone-config
2025-10-09 15:02:36 +02:00

60 lines
1.3 KiB
YAML

kind: pipeline
type: docker
name: build-test-and-push
trigger:
event:
- push
branch:
- main
steps:
- name: install+lint+typecheck+test
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-push
image: plugins/docker:latest
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
# Bygg-args till Dockerfile (Vite läser dem vid build)
build_args:
- VITE_API_BASE_URL=${VITE_API_BASE_URL}
- VITE_BASE_PATH=/hemhub/
# Taggar
tags:
- latest
- ${DRONE_COMMIT_SHA:0:7}
# Sätt till false/ta bort om ditt registry har TLS
insecure: true
environment:
# Drone-secret för backend-url, sätt i UI under repo -> Secrets
VITE_API_BASE_URL:
from_secret: VITE_API_BASE_URL
depends_on:
- install+lint+typecheck+test