Skip to content

Commit 88162b9

Browse files
authored
feat!: upgrade frontends and helm chart; automate release & image workflows
### Adjusted PR summary (Release/v4 / #209) This PR is primarily a **release-automation & deployment refactor**, but it also contains **real runtime-facing breaking changes** (Helm chart + local env + frontend deps). #### What changed * **CI/CD & release automation was split into multiple dedicated GitHub Actions workflows** * Adds workflows for *prepare release*, *create release/tag*, *publish libs*, *build/push images*, and *publish/bump Helm chart*, plus **label-based gating** to avoid running the “normal” CI during automated release PRs. ([GitHub][1]) * **Helm chart: secret handling was refactored (breaking for chart consumers)** * Secrets are now modeled more granularly (separate user/pass or API key fields) and can be referenced via `secretKeyRef` in values/templates; helper logic resolves secret names differently than before. This affects backend/admin deployments and ingress auth. ([GitHub][1]) * **Local/dev config: `.env.template` auth variables were reorganized** * Auth envs were split/clarified between frontend vs backend and redundant frontend auth vars were removed → local setups (and any automation that reads `.env`) may need updates. ([GitHub][1]) * **Frontend: major dependency upgrades + branding/theming guidance** * The PR includes a commit explicitly doing **major version updates of the frontends**. ([GitHub][1]) * The repo docs now point readers to a **UI Customization Guide** for “branding, theming, and logo configuration,” which is a strong signal that the frontend update impacts branding/theming workflows. ([GitHub][2]) * If this upgrade includes daisyUI v5 / Tailwind v4 (as you noted), that’s commonly associated with **config/theming approach changes** (daisyUI 5 is Tailwind 4–aligned and moves plugin usage into CSS via `@plugin`). ([daisyui.com][3]) * **Feature carried through backend + admin frontend: `continue_on_failure` for sitemap uploads** * Adds an option (incl. an admin UI checkbox) to continue crawling even if some pages fail. ([GitHub][1]) #### Breaking changes (callout) * **Breaking for Helm chart consumers**: values/schema for secrets and how they’re wired into templates changed (expect `values.yaml` updates). ([GitHub][1]) * **Breaking for local env / deployments using `.env.template`**: renamed/restructured auth variables. ([GitHub][1]) * **Breaking for the frontend service**: major dependency upgrades can change UI appearance and theming/branding integration; the repo now explicitly documents branding/theming/logo customization, and daisyUI 5 / Tailwind 4 upgrades commonly imply theming/config changes. ([GitHub][1]) [1]: #209 "Release/v4 by a-klos · Pull Request #209 · stackitcloud/rag-template · GitHub" [2]: https://github.com/stackitcloud/rag-template "GitHub - stackitcloud/rag-template: Template for AI chatbots & document management using Retrieval-Augmented Generation with vector search and FastAPI." [3]: https://daisyui.com/docs/upgrade/?lang=en&utm_source=chatgpt.com "daisyUI 5 upgrade guide"
1 parent 60d45c4 commit 88162b9

120 files changed

Lines changed: 10821 additions & 8662 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
*/.gitignore
2-
# Ignore node_modules directory
3-
frontend/node_modules/
42

5-
frontend/.nx/cache/
3+
# Node/Nx artifacts (keep build contexts small)
4+
**/node_modules
5+
**/.nx
66

7-
# Ignore package-lock.json or yarn.lock file
8-
frontend/package-lock.json
9-
frontend/yarn.lock
7+
# Frontend build outputs and logs
8+
services/frontend/dist
9+
services/frontend/tmp
10+
services/frontend/coverage
11+
services/frontend/apps/*/dist
12+
services/frontend/*.log
1013

11-
# Ignore any build artifacts or compiled files
12-
frontend/dist/
13-
frontend/build/
14-
frontend/*.log
15-
16-
# Ignore python envs and compiled python files
14+
# Python envs and compiled python files
1715
*/venv
1816
*/.venv
1917
*/.env
2018
*/*.pyc
2119

22-
2320
**/.notebooks

.env.template

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ S3_SECRET_ACCESS_KEY=your_s3_secret_key_here
1010
# =============================================================================
1111
# Basic Authentication (Required)
1212
# =============================================================================
13-
BASIC_AUTH="foo:$apr1$ryE0iE7H$F2SlPDNoFdGoaHrcla2HL/"
13+
# Used for backend/admin endpoints and reused by the frontend's auth prompt.
14+
BASIC_AUTH_USER=foo
15+
BASIC_AUTH_PASSWORD=bar
1416

1517
# =============================================================================
1618
# Langfuse Configuration (Required for observability)
@@ -27,12 +29,6 @@ LANGFUSE_INIT_USER_EMAIL="user@stackit.cloud"
2729
LANGFUSE_INIT_USER_NAME="stackiteer"
2830
LANGFUSE_INIT_USER_PASSWORD="stackit123"
2931

30-
# =============================================================================
31-
# Frontend Authentication (Required)
32-
# =============================================================================
33-
VITE_AUTH_USERNAME=foo
34-
VITE_AUTH_PASSWORD=bar
35-
3632
# =============================================================================
3733
# LLM Provider API Keys (Choose one or more)
3834
# =============================================================================

.github/workflows/build-images.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: build-images
2+
run-name: build-images ${{ github.event.release.tag_name }}
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
jobs:
12+
prepare:
13+
if: ${{ github.event_name == 'release' }}
14+
runs-on: ubuntu-latest
15+
outputs:
16+
tag: ${{ steps.release_tag.outputs.tag }}
17+
version: ${{ steps.release_tag.outputs.version }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Resolve release tag & version
23+
id: release_tag
24+
run: |
25+
git fetch --tags --force
26+
TAG="${{ github.event.release.tag_name }}"
27+
if [ -z "$TAG" ]; then
28+
echo "No Git tag found to check out" >&2
29+
exit 1
30+
fi
31+
VER_NO_V="${TAG#v}"
32+
echo "tag=$TAG" >> $GITHUB_OUTPUT
33+
echo "version=$VER_NO_V" >> $GITHUB_OUTPUT
34+
35+
build-image:
36+
needs: prepare
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
include:
42+
- name: rag-backend
43+
dockerfile: services/rag-backend/Dockerfile
44+
- name: admin-backend
45+
dockerfile: services/admin-backend/Dockerfile
46+
- name: document-extractor
47+
dockerfile: services/document-extractor/Dockerfile
48+
- name: mcp-server
49+
dockerfile: services/mcp-server/Dockerfile
50+
- name: frontend
51+
dockerfile: services/frontend/apps/chat-app/Dockerfile
52+
- name: admin-frontend
53+
dockerfile: services/frontend/apps/admin-app/Dockerfile
54+
env:
55+
REGISTRY: ghcr.io
56+
IMAGE_NS: ${{ github.repository }}
57+
VERSION: ${{ needs.prepare.outputs.version }}
58+
TAG: ${{ needs.prepare.outputs.tag }}
59+
steps:
60+
- uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
- name: Checkout release tag
64+
run: git checkout "$TAG"
65+
- name: Normalize IMAGE_NS to lowercase
66+
run: echo "IMAGE_NS=$(echo '${{ env.IMAGE_NS }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
67+
- name: Login to GHCR
68+
uses: docker/login-action@v3
69+
with:
70+
registry: ghcr.io
71+
username: ${{ github.actor }}
72+
password: ${{ secrets.PR_AUTOMATION_TOKEN }}
73+
- name: Set up Buildx
74+
uses: docker/setup-buildx-action@v3
75+
- name: Build & push ${{ matrix.name }}
76+
run: |
77+
docker buildx build --push \
78+
-t "$REGISTRY/$IMAGE_NS/${{ matrix.name }}:${VERSION}" \
79+
-t "$REGISTRY/$IMAGE_NS/${{ matrix.name }}:latest" \
80+
-f "${{ matrix.dockerfile }}" .
81+
- name: Capture digest
82+
run: |
83+
sudo apt-get update && sudo apt-get install -y jq
84+
ref="$REGISTRY/$IMAGE_NS/${{ matrix.name }}:${VERSION}"
85+
digest=$(docker buildx imagetools inspect "$ref" --format '{{json .Manifest.Digest}}' | jq -r . || true)
86+
jq -n --arg name "${{ matrix.name }}" --arg tag "$VERSION" --arg digest "$digest" '{($name): {tag: $tag, digest: $digest}}' > digest.json
87+
- name: Upload digest artifact
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: image-digest-${{ matrix.name }}
91+
path: digest.json
92+
93+
collect-digests:
94+
needs: [build-image]
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Download digest artifacts
98+
uses: actions/download-artifact@v4
99+
with:
100+
pattern: image-digest-*
101+
merge-multiple: false
102+
- name: Merge digests
103+
run: |
104+
sudo apt-get update && sudo apt-get install -y jq
105+
jq -s 'reduce .[] as $item ({}; . * $item)' image-digest-*/digest.json > image-digests.json
106+
- name: Upload merged digests
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: image-digests
110+
path: image-digests.json
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: bump-chart-version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
chart_version:
6+
description: "Chart version to set (does not touch appVersion)"
7+
required: true
8+
type: string
9+
ref:
10+
description: "Git ref to bump (default: main)"
11+
required: false
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
jobs:
19+
bump:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
ref: ${{ inputs.ref || 'main' }}
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.13'
31+
32+
- name: Install deps
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install "packaging==25.0" "ruamel.yaml==0.18.6"
36+
37+
- name: Bump chart version only
38+
env:
39+
CHART_VERSION: ${{ inputs.chart_version }}
40+
run: |
41+
if [ -z "${CHART_VERSION}" ]; then
42+
echo "chart_version input is required" >&2
43+
exit 1
44+
fi
45+
python tools/bump_chart_versions.py --mode chart-only --chart-version "$CHART_VERSION"
46+
47+
- name: Open PR for chart version bump
48+
uses: peter-evans/create-pull-request@v6
49+
with:
50+
base: main
51+
branch: chore/chart-bump-${{ inputs.chart_version }}
52+
title: "chore(release): bump chart version to ${{ inputs.chart_version }}"
53+
body: |
54+
Bump Chart.yaml version to ${{ inputs.chart_version }} (appVersion unchanged).
55+
commit-message: "chore(release): bump chart version to ${{ inputs.chart_version }}"
56+
add-paths: |
57+
infrastructure/**/Chart.yaml
58+
token: ${{ secrets.PR_AUTOMATION_TOKEN }}
59+
labels: chart-bump
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: create-release
2+
on:
3+
pull_request_target:
4+
types: [closed]
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
if: >-
13+
${{
14+
github.event.pull_request.merged == true &&
15+
contains(github.event.pull_request.labels.*.name, 'refresh-locks')
16+
}}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
token: ${{ secrets.PR_AUTOMATION_TOKEN }}
23+
24+
- name: Derive version from PR title
25+
id: ver
26+
run: |
27+
TITLE="${{ github.event.pull_request.title }}"
28+
VERSION=$(echo "$TITLE" | sed -nE 's/.*([0-9]+\.[0-9]+\.[0-9]+(\.post[0-9]+)?).*/\1/p' || true)
29+
if [ -z "$VERSION" ]; then
30+
echo "Could not extract version from PR title: $TITLE" >&2
31+
exit 1
32+
fi
33+
echo "version=$VERSION" >> $GITHUB_OUTPUT
34+
35+
- name: Verify appVersion matches release version (clean semver)
36+
env:
37+
RELEASE_VERSION: ${{ steps.ver.outputs.version }}
38+
run: |
39+
if echo "$RELEASE_VERSION" | grep -q '\.post'; then
40+
echo "Release version must be clean semver (no .post): $RELEASE_VERSION" >&2
41+
exit 1
42+
fi
43+
APP_VERSION=$(awk '/^appVersion:/ {print $2}' infrastructure/rag/Chart.yaml | tr -d "\"'")
44+
if [ -z "$APP_VERSION" ]; then
45+
echo "Could not read appVersion from infrastructure/rag/Chart.yaml" >&2
46+
exit 1
47+
fi
48+
NORMALIZED_APP_VERSION="${APP_VERSION#v}"
49+
NORMALIZED_APP_VERSION="${NORMALIZED_APP_VERSION#V}"
50+
if [ "$NORMALIZED_APP_VERSION" != "$RELEASE_VERSION" ]; then
51+
echo "Chart appVersion ($APP_VERSION) does not match release version ($RELEASE_VERSION)" >&2
52+
exit 1
53+
fi
54+
55+
- name: Create Git tag
56+
run: |
57+
git config user.name "github-actions"
58+
git config user.email "github-actions@github.com"
59+
git tag -a "v${{ steps.ver.outputs.version }}" -m "Release v${{ steps.ver.outputs.version }}"
60+
git push origin "v${{ steps.ver.outputs.version }}"
61+
62+
- name: Create GitHub Release
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
tag_name: v${{ steps.ver.outputs.version }}
66+
name: v${{ steps.ver.outputs.version }}
67+
generate_release_notes: true
68+
token: ${{ secrets.PR_AUTOMATION_TOKEN }}

.github/workflows/lint-and-test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ env:
1212

1313
jobs:
1414
changes:
15+
if: >-
16+
${{
17+
!contains(github.event.pull_request.labels.*.name, 'prepare-release') &&
18+
!contains(github.event.pull_request.labels.*.name, 'refresh-locks') &&
19+
!contains(github.event.pull_request.labels.*.name, 'chart-bump')
20+
}}
1521
name: Detect Changes
1622
runs-on: ubuntu-latest
1723
outputs:
@@ -27,7 +33,7 @@ jobs:
2733

2834
- name: Detect changes
2935
id: changes
30-
uses: dorny/paths-filter@v2
36+
uses: dorny/paths-filter@v3
3137
with:
3238
filters: |
3339
services:
@@ -81,7 +87,7 @@ jobs:
8187

8288
- name: Build Docker image
8389
run: |
84-
docker build -t $IMAGE_NAME --build-arg dev=1 -f services/${{ matrix.service }}/Dockerfile .
90+
docker build -t $IMAGE_NAME -f services/${{ matrix.service }}/Dockerfile.dev .
8591
8692
- name: Run linting
8793
run: |
@@ -104,15 +110,16 @@ jobs:
104110
- name: Checkout code
105111
uses: actions/checkout@v4
106112

107-
- name: Set Docker Image Names
113+
- name: Set Docker Image Name
108114
run: |
109115
echo "LINT_IMAGE_NAME=${{ matrix.library }}-lint:${{ needs.sanitize-branch-name.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
110116
echo "TEST_IMAGE_NAME=${{ matrix.library }}-test:${{ needs.sanitize-branch-name.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
111117
shell: bash
112118

113119
- name: Build lint image
114120
run: |
115-
docker build -t $LINT_IMAGE_NAME --build-arg TEST=0 -f libs/Dockerfile libs
121+
docker build -t $LINT_IMAGE_NAME --build-arg DIRECTORY=${{ matrix.library }} --build-arg TEST=0 -f libs/Dockerfile libs
122+
116123
117124
- name: Run linting
118125
run: |

0 commit comments

Comments
 (0)