Render tag-only image references and test them in CI
Validate and deploy error pages / Validate manifests (push) Successful in 18s
Validate and deploy error pages / Deploy to Kubernetes (push) Successful in 1m46s

This commit is contained in:
2026-10-14 21:02:28 +02:00
parent c147ea0dc9
commit e17bcb25c6
3 changed files with 7 additions and 6 deletions
+2 -5
View File
@@ -32,11 +32,8 @@ jobs:
- name: Lint and render
run: |
"${RUNNER_TEMP}/helm" lint . --values values-brunner-ninja.yaml
"${RUNNER_TEMP}/helm" template "${RELEASE_NAME}" . \
--namespace "${NAMESPACE}" \
--values values-brunner-ninja.yaml > "${RUNNER_TEMP}/rendered.yaml"
test -s "${RUNNER_TEMP}/rendered.yaml"
export PATH="${RUNNER_TEMP}:${PATH}"
./test.sh
deploy:
name: Deploy to Kubernetes
+1 -1
View File
@@ -29,7 +29,7 @@ spec:
type: RuntimeDefault
containers:
- name: nginx
image: {{ printf "%s:%s@%s" .Values.image.repository .Values.image.tag .Values.image.digest | quote }}
image: {{ printf "%s:%s" .Values.image.repository .Values.image.tag | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
+4
View File
@@ -23,6 +23,10 @@ for values_file in "${values_files[@]}"; do
--namespace default \
--values "${values_path}" > "${output}"
test -s "${output}"
if grep -Eq 'image:.*(@|%!|<nil>)' "${output}"; then
echo "Rendered image must use a valid repository:tag reference" >&2
exit 1
fi
done
if [[ -f "${workdir}/values-brunner-ninja.yaml" ]]; then