Files
hemhub-web/.drone.yml
Urban Modig ffb484b117
All checks were successful
continuous-integration/drone/push Build is passing
oidc config
2025-10-14 21:48:07 +02:00

63 lines
1.6 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/
- VITE_OIDC_AUTHORITY=https://rubble.se/hemhub/auth/realms/hemhub
- VITE_OIDC_CLIENT_ID=hemhub-public
- VITE_OIDC_REDIRECT_URI=https://rubble.se/hemhub/app/auth/callback
- VITE_OIDC_POST_LOGOUT_REDIRECT_URI=https://rubble.se/hemhub/app/
- VITE_OIDC_SILENT_REDIRECT_URI=https://rubble.se/hemhub/app/auth/silent-renew
# 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