Test: portal.test.klingenbergbygg.no, nyeste portal og en egen NATS; søknad på pause
Deploy test instance / deploy (push) Failing after 1s
lint-and-reload / lint (push) Failing after 1s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
This commit is contained in:
blandClaude Opus 5.5 committed 2026-09-30 20:11:30 +02:00
1 parent 56b30e126e
commit 93c6b6e6c5
4 files changed
+22 -60

No files matched your search

+11 -21
View File
@@ -1,35 +1,25 @@
name: Deploy instance
name: Deploy test instance
# This content repo owns its portal instance: which portal version runs
# on kasse. uhhm/portal only publishes versioned release artifacts;
# PORTAL_RELEASE below pins the one this site runs, so every rollout is
# a commit - auditable, and revertable by reverting it.
#
# Content-only changes never come through here: lint-and-reload
# hot-swaps those into the running instance over NATS.
#
# Runs on the host runner, because a deploy has to touch this host's
# filesystem and its units. It is allowed exactly one root action:
# /usr/local/bin/deploy-portal-instance, which checks the instance
# against a fixed list and the tag against a release-tag shape before
# it touches anything, and health-checks the site afterwards without a
# forwarded header - a check that sends the header Caddy would send
# cannot tell you the site is broken for everything that is not Caddy.
# Branch `test` is portal.test.klingenbergbygg.no: the newest portal
# release (cut from uhhm/portal main), with a NATS of its own on kasse,
# so nothing tried here reaches production or mails a customer. The
# production site is branch `main`, pinned in its own deploy.yml.
on:
workflow_dispatch:
push:
branches: [main]
branches: [test]
paths:
- .gitea/workflows/deploy.yml
env:
PORTAL_RELEASE: v0.6.3
INSTANCE: klingenberg-portal
INSTANCE: klingenberg-test
jobs:
deploy:
runs-on: fish
steps:
- name: Ship the pinned release and restart
run: sudo /usr/local/bin/deploy-portal-instance "$INSTANCE" "$PORTAL_RELEASE"
- name: Ship the newest release and restart
run: |
tag=$(curl -sf https://project.uhhm.no/api/v1/repos/uhhm/portal/releases/latest | jq -r .tag_name)
sudo /usr/local/bin/deploy-portal-instance "$INSTANCE" "$tag"
+8 -8
View File
@@ -1,21 +1,21 @@
name: lint-and-reload
on:
push:
branches: [main]
branches: [test]
jobs:
lint:
runs-on: fish
steps:
- name: checkout
run: |
rm -rf checkout && git clone --depth 1 https://prosjekt.klingenbergbygg.no/klingenbergbygg/questions.git checkout
# The lint is portal itself (`portal lint`), at the version this
# site runs (PORTAL_RELEASE in deploy.yml).
rm -rf checkout && git clone --depth 1 --branch test https://prosjekt.klingenbergbygg.no/klingenbergbygg/questions.git checkout
# The lint is portal itself, at the newest release: the one the
# test instance runs.
- name: lint
env:
PORTAL_RELEASE: v0.6.3
run: |
curl -sfL "https://project.uhhm.no/uhhm/portal/releases/download/$PORTAL_RELEASE/portal-x86_64-linux" -o portal && chmod +x portal
tag=$(curl -sf https://project.uhhm.no/api/v1/repos/uhhm/portal/releases/latest | jq -r .tag_name)
curl -sfL "https://project.uhhm.no/uhhm/portal/releases/download/$tag/portal-x86_64-linux" -o portal && chmod +x portal
./portal lint --path checkout/questions
# The test instance's own NATS, never production's.
- name: reload
run: nats --server nats://127.0.0.1:4222 pub portal.content.reload ""
run: nats --server nats://127.0.0.1:4232 pub portal.content.reload ""
+1
View File
@@ -89,6 +89,7 @@ needs:
i_arbeid: søknad under arbeid
levert: søknad levert
avslatt: avsluttet uten oppdrag
paused: true
- id: leveranse
who: kontoret, når en rapport, tegninger eller et vedtak er klart til kunden
wants: at kunden får dokumentet og vet at det ligger der
+2 -31
View File
@@ -133,11 +133,11 @@ alternatives:
encouragements:
- Gi det beste grunnlaget for utførelse.
- name: Ta det første spadetaket med en godkjent søknad
description: Er bygget ferdig prosjektert, kan vi utarbeide en byggesøknad og utførelsesbeskrivelse for offentlig godkjenning.
description: Er bygget ferdig prosjektert, kan vi utarbeide en byggesøknad og utførelsesbeskrivelse for offentlig godkjenning. Akkurat nå har vi ikke kapasitet til nye søknadsoppdrag; vi åpner igjen så snart vi kan.
action: /received/soknad
consequence:
- Send henvendelse
record_as: soknader
disabled: true
features:
- name: Slik går det videre
description: Vi går gjennom det du har, avtaler befaring eller forhåndskonferanse, og sender deg et tilbud. Du sier selv ja eller nei, og med et ja får du en innlogging der du følger søknaden og henter dokumentene.
@@ -145,35 +145,6 @@ alternatives:
- name: Hvem leser dette
description: Fredrik på kontoret leser henvendelsen og tar kontakt. Du når ham også på fredrik@klingenbergbygg.no.
icon: lucide:users
- name: Om tiltaket
requirements:
- name: name
label: Navn
type: text
placeholder: Navn
- name: email
label: E-post
type: email
placeholder: bruker@eksempel.no
- name: telefon
label: Telefon
type: tel
optional: true
placeholder: Telefonnummer
- name: adresse
label: Hvor ligger eiendommen?
type: text
placeholder: Adresse
- name: tiltak
label: Hva går tiltaket ut på?
type: textarea
placeholder: Tilbygg, ombygging, nybygg…
- name: tegninger
label: Tegninger og prosjektering
type: file
optional: true
description: Hva skal bygges, og hvor. Avhengig av størrelsen kan vi holde forhåndskonferanse med kommunen først.
icon: lucide:file-text
encouragements:
- Nesten som å ha gravemaskin!
slideshow: