Compare commits
1 Commits
main
...
720abf7cde
| Author | SHA1 | Date | |
|---|---|---|---|
|
720abf7cde
|
86
.gitea/workflows/lint-test-docker-pull.yaml
Normal file
86
.gitea/workflows/lint-test-docker-pull.yaml
Normal file
@@ -0,0 +1,86 @@
|
||||
name: lint-test-docker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
|
||||
jobs:
|
||||
docker-lint:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Branch Exists
|
||||
id: check-branch-exists
|
||||
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||
with:
|
||||
branch: "${{ github.base_ref }}"
|
||||
|
||||
- name: Branch Does Not Exist
|
||||
if: steps.check-branch-exists.outputs.exists == 'false'
|
||||
run: echo "Branch ${{ github.base_ref }} was not found, likely already merged"
|
||||
|
||||
- name: Set up Node.js
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Lint Docker Compose
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
run: |
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
|
||||
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
||||
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||
|
||||
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'hosts/**')
|
||||
|
||||
echo ">> Found changed files:"
|
||||
echo "$CHANGED_FILES"
|
||||
|
||||
# For each changed file, find its parent chart directory (the one with compose.yaml).
|
||||
# Then, create a unique list of those directories.
|
||||
CHANGED_COMPOSE=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||
dir=$(dirname "$file")
|
||||
while [[ "$dir" != "." && ! -f "$dir/compose.yaml" ]]; do
|
||||
dir=$(dirname "$dir")
|
||||
done
|
||||
if [[ "$dir" != "." ]]; then
|
||||
echo "$dir"
|
||||
fi
|
||||
done | sort -u)
|
||||
|
||||
if [[ -z "$CHANGED_COMPOSE" ]]; then
|
||||
echo ">> Could not determine changed compose files. This will happen if only files outside a compose file were changed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ">> Running dclint on changed compose files:"
|
||||
echo "$CHANGED_COMPOSE"
|
||||
|
||||
echo "$CHANGED_COMPOSE" | while read -r compose; do
|
||||
echo ">> Linting $compose ..."
|
||||
npx dclint $compose
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Docker linting on Pull Request for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-pull.yaml", "clear": true}]'
|
||||
image: true
|
||||
74
.gitea/workflows/lint-test-docker-push.yaml
Normal file
74
.gitea/workflows/lint-test-docker-push.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
name: lint-test-docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
|
||||
jobs:
|
||||
docker-lint:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Lint Docker Compose
|
||||
run: |
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
|
||||
TARGET_BRANCH="origin/main"
|
||||
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||
|
||||
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'hosts/**')
|
||||
|
||||
echo ">> Found changed files:"
|
||||
echo "$CHANGED_FILES"
|
||||
|
||||
# For each changed file, find its parent chart directory (the one with compose.yaml).
|
||||
# Then, create a unique list of those directories.
|
||||
CHANGED_COMPOSE=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||
dir=$(dirname "$file")
|
||||
while [[ "$dir" != "." && ! -f "$dir/compose.yaml" ]]; do
|
||||
dir=$(dirname "$dir")
|
||||
done
|
||||
if [[ "$dir" != "." ]]; then
|
||||
echo "$dir"
|
||||
fi
|
||||
done | sort -u)
|
||||
|
||||
if [[ -z "$CHANGED_COMPOSE" ]]; then
|
||||
echo ">> Could not determine changed compose files. This will happen if only files outside a compose file were changed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ">> Running dclint on changed compose files:"
|
||||
echo "$CHANGED_COMPOSE"
|
||||
|
||||
echo "$CHANGED_COMPOSE" | while read -r compose; do
|
||||
echo ">> Linting $compose ..."
|
||||
npx dclint $compose
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Docker linting on Push for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-push.yaml", "clear": true}]'
|
||||
image: true
|
||||
@@ -1,125 +0,0 @@
|
||||
name: lint-test-docker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'hosts/**'
|
||||
|
||||
env:
|
||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
||||
|
||||
jobs:
|
||||
lint-docker-compose:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Branch Exists
|
||||
id: check-branch-exists
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||
with:
|
||||
branch: "${{ github.base_ref }}"
|
||||
|
||||
- name: Report Branch Exists
|
||||
id: branch-exists
|
||||
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "exists=true" >> $GITEA_OUTPUT
|
||||
|
||||
- name: Set up Node.js
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Check Directories for Changes
|
||||
id: check-dir-changes
|
||||
if: steps.branch-exists.outputs.exists == 'true'
|
||||
run: |
|
||||
CHANGED_COMPOSE=()
|
||||
|
||||
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
||||
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo ""
|
||||
echo ">> Checking for changes in a pull request ..."
|
||||
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" | xargs -I {} dirname {} | sort -u | grep -E "hosts/[^/]+/[^/]+")
|
||||
else
|
||||
echo ""
|
||||
echo ">> Checking for changes from a push ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "hosts/[^/]+/[^/]+")
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ""
|
||||
echo ">> Changes detected:"
|
||||
echo "$GIT_DIFF"
|
||||
|
||||
for path in $GIT_DIFF; do
|
||||
CHANGED_COMPOSE+=$(echo "$path")
|
||||
done
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> No changes detected"
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${CHANGED_COMPOSE}" ]; then
|
||||
echo ""
|
||||
echo ">> Compose to Lint:"
|
||||
echo "$(echo "${CHANGED_COMPOSE[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "compose-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${CHANGED_COMPOSE[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Lint Docker Compose
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
env:
|
||||
CHANGED_COMPOSE: ${{ steps.check-dir-changes.outputs.compose-dir }}
|
||||
run: |
|
||||
echo ">> Running dclint on changed compose files:"
|
||||
echo "$CHANGED_COMPOSE"
|
||||
|
||||
echo "$CHANGED_COMPOSE" | while read -r compose; do
|
||||
echo ">> Linting $compose ..."
|
||||
npx dclint $compose
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Docker linting on Pull Request for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-docker-pull.yaml", "clear": true}]'
|
||||
image: true
|
||||
94
.gitea/workflows/lint-test-helm-pull.yaml
Normal file
94
.gitea/workflows/lint-test-helm-pull.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
name: lint-test-helm
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/**'
|
||||
|
||||
jobs:
|
||||
helm-lint:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Branch Exists
|
||||
id: check-branch-exists
|
||||
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||
with:
|
||||
branch: ${{ github.base_ref }}
|
||||
|
||||
- name: Branch Does Not Exist
|
||||
if: steps.check-branch-exists.outputs.exists == 'false'
|
||||
run: echo "Branch ${{ github.base_ref }} was not found, likely already merged"
|
||||
|
||||
- name: Set up Helm
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3.19.2
|
||||
|
||||
- name: Lint Helm Chart
|
||||
if: steps.check-branch-exists.outputs.exists == 'true'
|
||||
run: |
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
|
||||
TARGET_BRANCH="origin/${{ github.base_ref }}"
|
||||
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||
|
||||
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
||||
|
||||
echo ">> Found changed files:"
|
||||
echo "$CHANGED_FILES"
|
||||
|
||||
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
||||
# Then, create a unique list of those directories.
|
||||
CHANGED_CHARTS=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||
dir=$(dirname "$file")
|
||||
while [[ "$dir" != "." && ! -f "$dir/Chart.yaml" ]]; do
|
||||
dir=$(dirname "$dir")
|
||||
done
|
||||
if [[ "$dir" != "." ]]; then
|
||||
echo "$dir"
|
||||
fi
|
||||
done | sort -u)
|
||||
|
||||
if [[ -z "$CHANGED_CHARTS" ]]; then
|
||||
echo ">> Could not determine changed charts. This could happen if only files outside a chart were changed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ">> Running helm lint on changed charts:"
|
||||
echo "$CHANGED_CHARTS"
|
||||
|
||||
echo "$CHANGED_CHARTS" | while read -r chart; do
|
||||
helm dependency list --max-col-width 120 $chart 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
echo ">> Building dependency for "$chart" ..."
|
||||
helm dependency build "$chart"
|
||||
echo ">> Linting $chart..."
|
||||
helm lint "$chart"
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm linting on Pull Request for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-pull.yaml", "clear": true}]'
|
||||
image: true
|
||||
80
.gitea/workflows/lint-test-helm-push.yaml
Normal file
80
.gitea/workflows/lint-test-helm-push.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
name: lint-test-helm
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/**'
|
||||
|
||||
jobs:
|
||||
helm-lint:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3.19.2
|
||||
|
||||
- name: Lint Helm Chart
|
||||
run: |
|
||||
TARGET_BRANCH="origin/main"
|
||||
echo ">> Target branch for diff is: $TARGET_BRANCH"
|
||||
|
||||
CHANGED_FILES=$(git diff --name-only "$TARGET_BRANCH" -- 'clusters/**')
|
||||
|
||||
echo ">> Found changed files:"
|
||||
echo "$CHANGED_FILES"
|
||||
|
||||
# For each changed file, find its parent chart directory (the one with Chart.yaml).
|
||||
# Then, create a unique list of those directories.
|
||||
CHANGED_CHARTS=$(echo "$CHANGED_FILES" | while read -r file; do
|
||||
dir=$(dirname "$file")
|
||||
while [[ "$dir" != "." && ! -f "$dir/Chart.yaml" ]]; do
|
||||
dir=$(dirname "$dir")
|
||||
done
|
||||
if [[ "$dir" != "." ]]; then
|
||||
echo "$dir"
|
||||
fi
|
||||
done | sort -u)
|
||||
|
||||
if [[ -z "$CHANGED_CHARTS" ]]; then
|
||||
echo ">> Could not determine changed charts. This could happen if only files outside a chart were changed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ">> Running helm lint on changed charts:"
|
||||
echo "$CHANGED_CHARTS"
|
||||
|
||||
echo "$CHANGED_CHARTS" | while read -r chart; do
|
||||
helm dependency list --max-col-width 120 $chart 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
|
||||
echo ">> Building dependency for "$chart" ..."
|
||||
helm dependency build "$chart"
|
||||
echo ">> Linting $chart..."
|
||||
helm lint "$chart"
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 4
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm linting on Push for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-push.yaml", "clear": true}]'
|
||||
image: true
|
||||
@@ -1,164 +0,0 @@
|
||||
name: lint-test-helm
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/*/helm/**'
|
||||
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'clusters/*/helm/**'
|
||||
|
||||
env:
|
||||
CLUSTER: cl01tl
|
||||
BASE_BRANCH: "origin/${{ gitea.base_ref }}"
|
||||
|
||||
jobs:
|
||||
lint-helm:
|
||||
runs-on: ubuntu-js
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Branch Exists
|
||||
id: check-branch-exists
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: GuillaumeFalourd/branch-exists@v1.1
|
||||
with:
|
||||
branch: ${{ gitea.base_ref }}
|
||||
|
||||
- name: Report Branch Exists
|
||||
id: branch-exists
|
||||
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo ">> Branch ${{ gitea.base_ref }} exists, will continue with linting"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "exists=true" >> $GITEA_OUTPUT
|
||||
|
||||
- name: Set up Helm
|
||||
if: steps.branch-exists.outputs.exists == 'true'
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
version: v3
|
||||
|
||||
- name: Check Directories for Changes
|
||||
id: check-dir-changes
|
||||
if: steps.branch-exists.outputs.exists == 'true'
|
||||
run: |
|
||||
CHANGED_CHARTS=()
|
||||
|
||||
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
||||
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
echo ""
|
||||
echo ">> Checking for changes in a pull request ..."
|
||||
GIT_DIFF=$(git diff --name-only "${BASE_BRANCH}" | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
else
|
||||
echo ""
|
||||
echo ">> Checking for changes from a push ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
fi
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ""
|
||||
echo ">> Changes detected:"
|
||||
echo "$GIT_DIFF"
|
||||
|
||||
for path in $GIT_DIFF; do
|
||||
CHANGED_CHARTS+=$(echo "$path" | awk -F '/' '{print $4}')
|
||||
done
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> No changes detected"
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${CHANGED_CHARTS}" ]; then
|
||||
echo ""
|
||||
echo ">> Chart to Lint:"
|
||||
echo "$(echo "${CHANGED_CHARTS[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "chart-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${CHANGED_CHARTS[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Add Repositories
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Adding repositories for chart dependencies ..."
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
helm dependency list --max-col-width 120 clusters/${CLUSTER}/helm/$dir 2> /dev/null \
|
||||
| tail +2 | head -n -1 \
|
||||
| awk '{ print "helm repo add " $1 " " $3 }' \
|
||||
| while read cmd; do echo "$cmd" | sh; done || true
|
||||
done
|
||||
|
||||
if helm repo list | tail +2 | read -r; then
|
||||
echo ""
|
||||
echo ">> Update repository cache ..."
|
||||
helm repo update
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
|
||||
- name: Lint Helm Chart
|
||||
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
||||
env:
|
||||
CHANGED_CHARTS: ${{ steps.check-dir-changes.outputs.chart-dir }}
|
||||
run: |
|
||||
echo ">> Running linting on changed charts ..."
|
||||
|
||||
for dir in ${CHANGED_CHARTS}; do
|
||||
chart_path=clusters/${CLUSTER}/helm/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
cd $chart_path
|
||||
|
||||
echo ""
|
||||
echo ">> Building helm dependency ..."
|
||||
helm dependency build --skip-refresh
|
||||
|
||||
echo ""
|
||||
echo ">> Linting helm ..."
|
||||
helm lint --namespace "$chart_name"
|
||||
|
||||
else
|
||||
echo ""
|
||||
echo ">> Directory $chart_path does not contain a Chart.yaml. Skipping ..."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
- name: ntfy Failed
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
title: 'Test Failure - Infrastructure'
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,failed
|
||||
details: 'Helm linting on Pull Request for Infrastructure has failed!'
|
||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/infrastructure/actions?workflow=lint-test-helm-pull.yaml", "clear": true}]'
|
||||
image: true
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
RENDER_DIR=()
|
||||
|
||||
echo ">> Checking for changes from HEAD^..HEAD ..."
|
||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ">> Changes detected:"
|
||||
@@ -81,13 +81,13 @@ jobs:
|
||||
|
||||
if [ -n "${RENDER_DIR}" ]; then
|
||||
echo ">> Directories to Render:"
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)"
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
@@ -147,16 +147,12 @@ jobs:
|
||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo ">> Rendering chart: $chart_name"
|
||||
echo ">> Chart path $chart_path"
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||
TEMPLATE=""
|
||||
|
||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||
|
||||
cd $chart_path
|
||||
|
||||
@@ -170,31 +166,36 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo ">> Rendering templates ..."
|
||||
|
||||
case "$chart_name" in
|
||||
"stack")
|
||||
echo ""
|
||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
||||
echo ">> Special Rendering for stack ..."
|
||||
helm template stack ./ --namespace argocd --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
||||
echo ""
|
||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
||||
"cilium")
|
||||
echo ">> Special Rendering for cilium ..."
|
||||
helm template cilium ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"coredns")
|
||||
echo ">> Special Rendering for coredns ..."
|
||||
helm template coredns ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"metrics-server")
|
||||
echo ">> Special Rendering for metrics-server ..."
|
||||
helm template metrics-server ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"prometheus-operator-crds")
|
||||
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo ">> Standard Rendering for $chart_name ..."
|
||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
||||
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo ">> Formating rendered template ..."
|
||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||
|
||||
echo ""
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||
ls $OUTPUT_FOLDER
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
@@ -257,9 +258,9 @@ jobs:
|
||||
PAYLOAD=$( jq -n \
|
||||
--arg head "${BRANCH_NAME}" \
|
||||
--arg base "${BASE_BRANCH}" \
|
||||
--arg title "Automated Manifest Update - Automerge" \
|
||||
--arg title "Automated Manifest Update" \
|
||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow. This is expected to be automerged." \
|
||||
'{head: $head, base: $base, title: $title, body: $body}' )
|
||||
'{head: $head, base: $base, title: $title, body: $body'} )
|
||||
|
||||
echo ">> Creating PR from branch ${BRANCH_NAME} into ${BASE_BRANCH}"
|
||||
echo ">> With Endpoint of:"
|
||||
@@ -326,7 +327,7 @@ jobs:
|
||||
PAYLOAD=$( jq -n \
|
||||
--arg Do "merge" \
|
||||
--arg delete_branch_after_merge "true" \
|
||||
'{Do: $Do, delete_branch_after_merge: $delete_branch_after_merge}' )
|
||||
'{Do: $Do, delete_branch_after_merge: $delete_branch_after_merge'} )
|
||||
|
||||
echo ">> Merging PR with ID: ${PR_ID}"
|
||||
echo ">> With Endpoint of:"
|
||||
|
||||
@@ -67,13 +67,13 @@ jobs:
|
||||
|
||||
if [ -n "${RENDER_DIR}" ]; then
|
||||
echo ">> Directories to Render:"
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)"
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
@@ -133,16 +133,12 @@ jobs:
|
||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo ">> Rendering chart: $chart_name"
|
||||
echo ">> Chart path $chart_path"
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||
TEMPLATE=""
|
||||
|
||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||
|
||||
cd $chart_path
|
||||
|
||||
@@ -156,31 +152,36 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo ">> Rendering templates ..."
|
||||
|
||||
case "$chart_name" in
|
||||
"stack")
|
||||
echo ""
|
||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
||||
echo ">> Special Rendering for stack ..."
|
||||
helm template stack ./ --namespace argocd --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
||||
echo ""
|
||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
||||
"cilium")
|
||||
echo ">> Special Rendering for cilium ..."
|
||||
helm template cilium ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"coredns")
|
||||
echo ">> Special Rendering for coredns ..."
|
||||
helm template coredns ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"metrics-server")
|
||||
echo ">> Special Rendering for metrics-server ..."
|
||||
helm template metrics-server ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"prometheus-operator-crds")
|
||||
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo ">> Standard Rendering for $chart_name ..."
|
||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
||||
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo ">> Formating rendered template ..."
|
||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||
|
||||
echo ""
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||
ls $OUTPUT_FOLDER
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
@@ -197,14 +198,13 @@ jobs:
|
||||
run: |
|
||||
cd ${MANIFEST_DIR}
|
||||
|
||||
if git status --porcelain --untracked-files=all | grep -q '^.' ; then
|
||||
if git status --porcelain | grep -q .; then
|
||||
echo ">> Changes detected"
|
||||
# git status --porcelain --untracked-files=all
|
||||
git status --porcelain
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
|
||||
else
|
||||
echo ">> No changes detected, skipping PR creation"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
@@ -300,7 +300,7 @@ jobs:
|
||||
--arg assignee "${ASSIGNEE}" \
|
||||
--arg title "Automated Manifest Update" \
|
||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body'} )
|
||||
|
||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||
echo ">> With Endpoint of:"
|
||||
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
RENDER_DIR=()
|
||||
|
||||
echo ">> Checking for changes from HEAD^..HEAD ..."
|
||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
GIT_DIFF=$(git diff --name-only HEAD^..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ">> Changes detected:"
|
||||
@@ -86,13 +86,13 @@ jobs:
|
||||
|
||||
if [ -n "${RENDER_DIR}" ]; then
|
||||
echo ">> Directories to Render:"
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)"
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
@@ -152,16 +152,12 @@ jobs:
|
||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo ">> Rendering chart: $chart_name"
|
||||
echo ">> Chart path $chart_path"
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||
TEMPLATE=""
|
||||
|
||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||
|
||||
cd $chart_path
|
||||
|
||||
@@ -175,31 +171,36 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo ">> Rendering templates ..."
|
||||
|
||||
case "$chart_name" in
|
||||
"stack")
|
||||
echo ""
|
||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
||||
echo ">> Special Rendering for stack ..."
|
||||
helm template stack ./ --namespace argocd --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
||||
echo ""
|
||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
||||
"cilium")
|
||||
echo ">> Special Rendering for cilium ..."
|
||||
helm template cilium ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"coredns")
|
||||
echo ">> Special Rendering for coredns ..."
|
||||
helm template coredns ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"metrics-server")
|
||||
echo ">> Special Rendering for metrics-server ..."
|
||||
helm template metrics-server ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"prometheus-operator-crds")
|
||||
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo ">> Standard Rendering for $chart_name ..."
|
||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
||||
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo ">> Formating rendered template ..."
|
||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||
|
||||
echo ""
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||
ls $OUTPUT_FOLDER
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
@@ -318,7 +319,7 @@ jobs:
|
||||
--arg assignee "${ASSIGNEE}" \
|
||||
--arg title "Automated Manifest Update" \
|
||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body'} )
|
||||
|
||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||
echo ">> With Endpoint of:"
|
||||
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
RENDER_DIR=()
|
||||
|
||||
echo ">> Checking for changes ..."
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep -E "clusters/[^/]+/helm/[^/]+")
|
||||
GIT_DIFF=$(git diff --name-only ${{ gitea.event.before }}..HEAD | xargs -I {} dirname {} | sort -u | grep "clusters/cl01tl/helm/")
|
||||
|
||||
if [ -n "${GIT_DIFF}" ]; then
|
||||
echo ">> Changes detected:"
|
||||
@@ -84,13 +84,13 @@ jobs:
|
||||
|
||||
if [ -n "${RENDER_DIR}" ]; then
|
||||
echo ">> Directories to Render:"
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)"
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)"
|
||||
|
||||
echo "----"
|
||||
|
||||
echo "changes-detected=true" >> $GITEA_OUTPUT
|
||||
echo "render-dir<<EOF" >> $GITEA_OUTPUT
|
||||
echo "$(echo "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "$(printf "%s\n" "${RENDER_DIR[@]}" | sort -u)" >> $GITEA_OUTPUT
|
||||
echo "EOF" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "changes-detected=false" >> $GITEA_OUTPUT
|
||||
@@ -150,16 +150,12 @@ jobs:
|
||||
chart_path=${MAIN_DIR}/clusters/${CLUSTER}/helm/$dir
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo ">> Rendering chart: $chart_name"
|
||||
echo ">> Chart path $chart_path"
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||
TEMPLATE=""
|
||||
|
||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||
OUTPUT_FILE="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/$chart_name.yaml"
|
||||
|
||||
cd $chart_path
|
||||
|
||||
@@ -173,31 +169,36 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo ">> Rendering templates ..."
|
||||
|
||||
case "$chart_name" in
|
||||
"stack")
|
||||
echo ""
|
||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
||||
echo ">> Special Rendering for stack ..."
|
||||
helm template stack ./ --namespace argocd --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
||||
echo ""
|
||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
||||
"cilium")
|
||||
echo ">> Special Rendering for cilium ..."
|
||||
helm template cilium ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"coredns")
|
||||
echo ">> Special Rendering for coredns ..."
|
||||
helm template coredns ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"metrics-server")
|
||||
echo ">> Special Rendering for metrics-server ..."
|
||||
helm template metrics-server ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
"prometheus-operator-crds")
|
||||
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo ">> Standard Rendering for $chart_name ..."
|
||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
||||
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds > "$OUTPUT_FILE"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo ">> Formating rendered template ..."
|
||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||
|
||||
echo ""
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||
ls $OUTPUT_FOLDER
|
||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FILE"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
@@ -316,7 +317,7 @@ jobs:
|
||||
--arg assignee "${ASSIGNEE}" \
|
||||
--arg title "Automated Manifest Update" \
|
||||
--arg body "This PR contains newly rendered Kubernetes manifests automatically generated by the CI workflow." \
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body}' )
|
||||
'{head: $head, base: $base, assignee: $assignee, title: $title, body: $body'} )
|
||||
|
||||
echo ">> Creating PR from branch ${HEAD_BRANCH} into ${BASE_BRANCH}"
|
||||
echo ">> With Endpoint of:"
|
||||
|
||||
@@ -4,9 +4,9 @@ dependencies:
|
||||
version: 0.46.1
|
||||
- name: argo-events
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 2.4.18
|
||||
version: 2.4.17
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:6cc24f6ce2b7f67c2eeab9bb6f64ebfedc082a2e809fc1f03f691f99a3006143
|
||||
generated: "2025-12-04T01:01:06.532396136Z"
|
||||
digest: sha256:0b4fdd40fb3028efbfa6ae20e3191f923062771f843395d571846a84baff572a
|
||||
generated: "2025-12-03T23:42:37.127631103Z"
|
||||
|
||||
@@ -21,7 +21,7 @@ dependencies:
|
||||
version: 0.46.1
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
- name: argo-events
|
||||
version: 2.4.18
|
||||
version: 2.4.17
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
- name: postgres-cluster
|
||||
alias: postgres-17-cluster
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:c3bafb322ca02710c8f325fefef20678957a8c6fd86894e44e5e318997e5cb80
|
||||
generated: "2025-12-03T23:59:57.54998859Z"
|
||||
generated: "2025-12-03T23:42:54.643409381Z"
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:0bb36c0da68b901a005703e354f3f00f65c60ec3d1eddc2d08fa190062076944
|
||||
generated: "2025-12-04T00:00:11.07185823Z"
|
||||
generated: "2025-12-03T23:43:06.850138502Z"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: element-web
|
||||
repository: https://ananace.gitlab.io/charts
|
||||
version: 1.4.26
|
||||
version: 1.4.25
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.1
|
||||
digest: sha256:601cbb43296add7470b663f64b7bc18a2220d3cfff7bef397f72174929d9ff76
|
||||
generated: "2025-12-03T23:41:18.74872215Z"
|
||||
digest: sha256:06208f8ba47fc2e2c0e56ea2e08b3539cb4c5d3ac5eeaf22936e84925b7add90
|
||||
generated: "2025-12-03T17:03:58.859116734Z"
|
||||
|
||||
@@ -17,7 +17,7 @@ maintainers:
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: element-web
|
||||
version: 1.4.26
|
||||
version: 1.4.25
|
||||
repository: https://ananace.gitlab.io/charts
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:e4d7c431d7c88cf31d53d611b4fe901fb68c11a2666e48d38ac40feb45b904b5
|
||||
generated: "2025-12-04T00:00:29.398819751Z"
|
||||
generated: "2025-12-03T23:43:17.683917661Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:53e3b31b3fa3916ac4478c0ca3733a18f7145a0129b6a9c7aefdaf8169cb525c
|
||||
generated: "2025-12-04T00:00:45.882393108Z"
|
||||
generated: "2025-12-03T23:43:29.066435508Z"
|
||||
|
||||
@@ -10,12 +10,12 @@ dependencies:
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.1
|
||||
- name: postgres-cluster
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:b753b6ab3bced4892f4a4662b4c353f1f59345e42f155aef06124e72b3e72468
|
||||
generated: "2025-12-04T00:01:03.661689761Z"
|
||||
digest: sha256:8352c2ba7b2537aa7b22d1900ad2833f8e1b29608dfdae34d83b6f5aad340106
|
||||
generated: "2025-12-03T23:43:40.166625202Z"
|
||||
|
||||
@@ -36,7 +36,7 @@ dependencies:
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:3bd7096e4401df5818733b3e0b08f281c12af9b54a272fbe3e753b2616d725dd
|
||||
generated: "2025-12-04T00:01:28.278027037Z"
|
||||
generated: "2025-12-03T23:43:55.696569995Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:65d33f10a17d25234358734184d3bc637209a12dc5f2122a594efdb02df15b41
|
||||
generated: "2025-12-04T00:01:45.803341058Z"
|
||||
generated: "2025-12-03T23:44:06.622070209Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:d22093f32435743617e91c5e1453d6c9ce6846362925c96d5edd0500a2e9f53d
|
||||
generated: "2025-12-04T00:01:59.998640158Z"
|
||||
generated: "2025-12-03T23:44:16.571736081Z"
|
||||
|
||||
@@ -4,9 +4,9 @@ dependencies:
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
- name: cloudflared
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 1.23.1
|
||||
digest: sha256:c11fe08d5b2f088016d3752960cc7e8cb8cae040f77cf74975e24afcf349805c
|
||||
generated: "2025-12-03T23:42:04.01972761Z"
|
||||
digest: sha256:229ec32055f350932f84be3a5fd211b883504a4e760114f3bdf726a59aef86ec
|
||||
generated: "2025-12-03T06:03:44.411795767Z"
|
||||
|
||||
@@ -22,7 +22,7 @@ dependencies:
|
||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||
version: 4.4.0
|
||||
- name: meilisearch
|
||||
version: 0.17.2
|
||||
version: 0.17.1
|
||||
repository: https://meilisearch.github.io/meilisearch-kubernetes
|
||||
- name: cloudflared
|
||||
alias: cloudflared
|
||||
|
||||
@@ -9,7 +9,7 @@ karakeep:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/karakeep-app/karakeep
|
||||
tag: 0.29.1
|
||||
tag: 0.29.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: DATA_DIR
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:21c6f653942386f953fb2165351464a4cc08a64ba4c441896c23295635b1e93b
|
||||
generated: "2025-12-04T00:02:13.463643682Z"
|
||||
generated: "2025-12-03T23:44:26.732955933Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:d5f01022bab45b50149c74d1aedcc636cad649d92bfeb1e5b4c32d0b20428d4a
|
||||
generated: "2025-12-04T00:02:27.103752082Z"
|
||||
generated: "2025-12-03T23:44:36.571878454Z"
|
||||
|
||||
@@ -15,4 +15,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:1bf6e5f4693930d4f0ee8753eae5afee055894f01ddbefbae969bf834c8cad99
|
||||
generated: "2025-12-04T00:02:43.058364936Z"
|
||||
generated: "2025-12-03T23:44:47.031540217Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:e1dfc9657a3d926d9ba82f3bab3a56c9b737e9d43470c84167914b658c659ea3
|
||||
generated: "2025-12-04T00:03:06.662631361Z"
|
||||
generated: "2025-12-03T23:44:59.958812842Z"
|
||||
|
||||
@@ -9,7 +9,7 @@ n8n:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/n8n-io/n8n
|
||||
tag: 1.123.1
|
||||
tag: 1.123.0
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: GENERIC_TIMEZONE
|
||||
@@ -93,7 +93,7 @@ n8n:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/n8n-io/n8n
|
||||
tag: 1.123.1
|
||||
tag: 1.123.0
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- n8n
|
||||
@@ -188,7 +188,7 @@ n8n:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/n8n-io/n8n
|
||||
tag: 1.123.1
|
||||
tag: 1.123.0
|
||||
pullPolicy: IfNotPresent
|
||||
command:
|
||||
- n8n
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:acb3614df881e62f4e0c9ae21a09353cfd731beae376bba0461f834abb84b070
|
||||
generated: "2025-12-04T00:03:18.892421017Z"
|
||||
generated: "2025-12-03T23:45:11.588964597Z"
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:fdf82a6c450624d70404817e92d96626b87ee5c011215ca3c15338c6c3d9b181
|
||||
generated: "2025-12-04T00:03:31.441035529Z"
|
||||
generated: "2025-12-03T23:45:23.819514213Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:4cba2d50c7be189d6e9d70eebb25c86b6231e205cbf3e9af6671ebeb0b660c22
|
||||
generated: "2025-12-04T00:03:44.041965843Z"
|
||||
generated: "2025-12-03T23:45:35.666519847Z"
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:427e54610c6c59529dda67a52358660a47b1a44880136ebff4949bdfa4a5c73d
|
||||
generated: "2025-12-04T00:03:55.095377057Z"
|
||||
generated: "2025-12-03T23:45:46.946571201Z"
|
||||
|
||||
@@ -28,7 +28,7 @@ qbittorrent:
|
||||
qbittorrent:
|
||||
image:
|
||||
repository: ghcr.io/linuxserver/qbittorrent
|
||||
tag: 5.1.4@sha256:f0465dbb2aa14397fd205a0240ee562eb062354c036ccc444084fe46c6c75091
|
||||
tag: 5.1.4@sha256:a2eedc99b4876916943bd33e7c415efc448f6b514aa39b4f98c1e6472a717301
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:ff043dfbfcff54587838ae8289377c7412eeb507572d42f1b19fd528758a4eb9
|
||||
generated: "2025-12-04T00:04:12.153886381Z"
|
||||
generated: "2025-12-03T23:45:58.660209368Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:34a598cda9f762b3f4ae7f7138f5183a4942fca9fafe2611162a9e3f2e293635
|
||||
generated: "2025-12-04T00:04:31.751157172Z"
|
||||
generated: "2025-12-03T23:46:09.358629515Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:e343a4ab6603b661eee718af7fabe97c5a9315e288b4b9332bb27d58241b5a13
|
||||
generated: "2025-12-04T00:04:44.730167395Z"
|
||||
generated: "2025-12-03T23:46:20.885583334Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:4c327d7eac20b2a96f540aecf9ac2652064bf0cf734ffd288a058e57ab6c0f68
|
||||
generated: "2025-12-04T00:05:10.246917041Z"
|
||||
generated: "2025-12-03T23:46:33.062797181Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:77330bdfa1da43d65b188105cf66cc1cd656a904789ee1761da16e8a4104f166
|
||||
generated: "2025-12-04T00:05:22.617898927Z"
|
||||
generated: "2025-12-03T23:46:45.2422466Z"
|
||||
|
||||
@@ -9,7 +9,7 @@ searxng:
|
||||
main:
|
||||
image:
|
||||
repository: searxng/searxng
|
||||
tag: latest@sha256:5cf43eea89b334f0b34ec03eef03a432e1734dbc13e980878ea1442c50391c7e
|
||||
tag: latest@sha256:09dfc123bd7c118ed086471b42d17ed57964827beffeb8d7f012dae3d2608545
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: SEARXNG_BASE_URL
|
||||
@@ -43,7 +43,7 @@ searxng:
|
||||
main:
|
||||
image:
|
||||
repository: searxng/searxng
|
||||
tag: latest@sha256:5cf43eea89b334f0b34ec03eef03a432e1734dbc13e980878ea1442c50391c7e
|
||||
tag: latest@sha256:09dfc123bd7c118ed086471b42d17ed57964827beffeb8d7f012dae3d2608545
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: SEARXNG_BASE_URL
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:bbecefd5c20585a9fcde532663e06698a4a8057066de9483b0b2de50f210037f
|
||||
generated: "2025-12-04T00:05:35.118162699Z"
|
||||
generated: "2025-12-03T23:46:56.383234443Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:00f958cebd996abfbb1335aa45dac1e0cb945257e2111c00dbb419d0d21e4369
|
||||
generated: "2025-12-04T00:05:46.502013847Z"
|
||||
generated: "2025-12-03T23:47:08.099363423Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:b133ec7f906fdab9426e3014801cba376eb61e7b490d42c22bce058e640f779d
|
||||
generated: "2025-12-04T00:05:58.76880801Z"
|
||||
generated: "2025-12-03T23:47:21.88336627Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:87a9e98c0de182dec42160186a57ced84a62782c9a84fe0dbea56789de9606bf
|
||||
generated: "2025-12-04T00:06:09.631961901Z"
|
||||
generated: "2025-12-03T23:47:35.856489103Z"
|
||||
|
||||
@@ -9,4 +9,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:57649b6b5a03dbb091b0b3aca3be7b177503f7a1e5b52adcda8be26346893dfe
|
||||
generated: "2025-12-04T00:06:19.920166876Z"
|
||||
generated: "2025-12-03T23:47:48.03333678Z"
|
||||
|
||||
@@ -6,4 +6,4 @@ dependencies:
|
||||
repository: oci://harbor.alexlebens.net/helm-charts
|
||||
version: 6.16.1
|
||||
digest: sha256:974f36a9b9acf1dbe8c6466857d5fc8ca938f35259958e9be5f7248fae5c1517
|
||||
generated: "2025-12-04T00:06:31.73820002Z"
|
||||
generated: "2025-12-03T23:48:00.603540325Z"
|
||||
|
||||
Reference in New Issue
Block a user