Compare commits

...
9 Commits
Author SHA1 Message Date
Gitea Actions 9447f9b0be Release 0.1.18 [auto-version-bump] 2026-10-14 10:02:32 +02:00
Ein Anderssono 1e9e111745 Keep healthy frontend pod during releases
Build and publish frontend / publish (push) Successful in 42s
2026-10-14 10:02:15 +02:00
Gitea Actions 4fbd3ceabd Release 0.1.17 [auto-version-bump] 2026-10-14 09:59:18 +02:00
Ein Anderssono 85250d62e7 Bake frontend version as root during image build
Build and publish frontend / publish (push) Successful in 39s
2026-10-14 09:58:57 +02:00
Ein Anderssono 3d1328301a Copy game page into frontend image
Build and publish frontend / publish (push) Failing after 6s
2026-10-14 09:58:14 +02:00
Gitea Actions 7cd062ee1f Release 0.1.16 [auto-version-bump] 2026-10-14 09:50:31 +02:00
Ein Anderssono 305a568899 Create temporary Helm registry credentials file
Build and publish frontend / publish (push) Successful in 32s
2026-10-14 09:50:18 +02:00
Gitea Actions 01cbc4f759 Release 0.1.15 [auto-version-bump] 2026-10-14 09:49:11 +02:00
Ein Anderssono 9082596000 Authenticate Helm chart publication to Harbor
Build and publish frontend / publish (push) Failing after 24s
2026-10-14 09:48:53 +02:00
6 changed files with 39 additions and 8 deletions
+15 -1
View File
@@ -124,8 +124,22 @@ jobs:
helm lint deploy/helm/ai-spel-frontend helm lint deploy/helm/ai-spel-frontend
helm package deploy/helm/ai-spel-frontend --destination "$publish_dir" \ helm package deploy/helm/ai-spel-frontend --destination "$publish_dir" \
--version "$version" --app-version "$version" --version "$version" --app-version "$version"
registry_config="$RUNNER_TEMP/helm/registry.json"
mkdir -p "$(dirname "$registry_config")"
printf '{}' > "$registry_config"
printf '%s' "$HARBOR_PASSWORD" | helm registry login harbor.k3s.k0.nu \
--username "$HARBOR_USERNAME" --password-stdin \
--registry-config "$registry_config"
helm push "$publish_dir/ai-spel-frontend-$version.tgz" \ helm push "$publish_dir/ai-spel-frontend-$version.tgz" \
oci://harbor.k3s.k0.nu/ai-spel oci://harbor.k3s.k0.nu/ai-spel --registry-config "$registry_config"
chart_metadata="$(helm show chart oci://harbor.k3s.k0.nu/ai-spel/ai-spel-frontend \
--version "$version" --registry-config "$registry_config")"
chart_version="$(printf '%s\n' "$chart_metadata" | awk '$1 == "version:" { print $2 }')"
chart_app_version="$(printf '%s\n' "$chart_metadata" | awk '$1 == "appVersion:" { gsub(/"/, "", $2); print $2 }')"
[[ "$chart_version" == "$version" && "$chart_app_version" == "$version" ]] || {
echo "Published frontend chart version mismatch: chart=$chart_version app=$chart_app_version expected=$version"
exit 1
}
helm template ai-spel-frontend "$publish_dir/ai-spel-frontend-$version.tgz" \ helm template ai-spel-frontend "$publish_dir/ai-spel-frontend-$version.tgz" \
--namespace ai-spel > "$publish_dir/frontend-manifest.yaml" --namespace ai-spel > "$publish_dir/frontend-manifest.yaml"
+4 -4
View File
@@ -1,11 +1,11 @@
FROM nginxinc/nginx-unprivileged:1.27-alpine FROM nginxinc/nginx-unprivileged:1.27-alpine
ARG FRONTEND_VERSION ARG FRONTEND_VERSION
USER root RUN test -n "$FRONTEND_VERSION"
RUN test -n "$FRONTEND_VERSION" \ COPY index.html /usr/share/nginx/html/index.html
&& sed -i "s/__FRONTEND_VERSION__/${FRONTEND_VERSION}/g" /usr/share/nginx/html/index.html
COPY nginx/default.conf /etc/nginx/conf.d/default.conf COPY nginx/default.conf /etc/nginx/conf.d/default.conf
USER root
RUN sed -i "s/__FRONTEND_VERSION__/${FRONTEND_VERSION}/g" /usr/share/nginx/html/index.html
USER 101 USER 101
EXPOSE 8080 EXPOSE 8080
+1 -1
View File
@@ -1 +1 @@
0.1.14 0.1.18
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: ai-spel-frontend name: ai-spel-frontend
description: Static web frontend for the Swedish life simulator description: Static web frontend for the Swedish life simulator
type: application type: application
version: 0.1.14 version: 0.1.18
appVersion: "0.1.14" appVersion: "0.1.18"
@@ -7,6 +7,13 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
minReadySeconds: {{ .Values.deployment.minReadySeconds }}
progressDeadlineSeconds: {{ .Values.deployment.progressDeadlineSeconds }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: {{ .Values.deployment.maxUnavailable }}
maxSurge: {{ .Values.deployment.maxSurge }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
@@ -40,11 +47,15 @@ spec:
port: http port: http
initialDelaySeconds: 2 initialDelaySeconds: 2
periodSeconds: 5 periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 10 periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
+6
View File
@@ -1,4 +1,10 @@
replicaCount: 1 replicaCount: 1
deployment:
# Keep the old single replica available until its replacement passes readiness.
maxUnavailable: 0
maxSurge: 1
minReadySeconds: 5
progressDeadlineSeconds: 600
image: image:
repository: harbor.k3s.k0.nu/ai-spel/frontend repository: harbor.k3s.k0.nu/ai-spel/frontend
pullPolicy: IfNotPresent pullPolicy: IfNotPresent