Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fbd3ceabd | ||
|
|
85250d62e7 | ||
|
|
3d1328301a | ||
|
|
7cd062ee1f | ||
|
|
305a568899 | ||
|
|
01cbc4f759 | ||
|
|
9082596000 |
@@ -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
@@ -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
|
||||||
|
|||||||
@@ -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.17
|
||||||
appVersion: "0.1.14"
|
appVersion: "0.1.17"
|
||||||
Reference in New Issue
Block a user