Skip to content

feat: Distroless Alloy docker image using chisel #18371

feat: Distroless Alloy docker image using chisel

feat: Distroless Alloy docker image using chisel #18371

Workflow file for this run

name: Test Helm chart
on: pull_request
permissions:
contents: read
jobs:
regenerate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Setup tools
uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0
with:
install_args: helm-docs
- name: Regenerate docs
run: |
make generate-helm-docs
if ! git diff --exit-code; then
echo "Helm chart documentation is not up to date. Please run 'make generate-helm-docs' and commit changes!" >&2
exit 1
fi
regenerate-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
# renovate: datasource=github-releases packageName=helm/helm
version: v3.21.1
- name: Regenerate tests
run: |
make generate-helm-tests
if [ ! -z "$(git status --porcelain)" ]; then
echo "Helm chart tests are not up to date. Please run 'make generate-helm-tests' and commit changes!" >&2
exit 1
fi
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
with:
# renovate: datasource=github-releases packageName=helm/helm
version: v3.21.1
- name: Install Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13.3'
check-latest: true
- name: Install chart-testing
uses: helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0
- name: Determine changed charts
id: list-changed
run: |
changed=$(ct list-changed --config ./operations/helm/ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Lint charts
run: ct lint --config ./operations/helm/ct.yaml
- name: Create kind cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
if: steps.list-changed.outputs.changed == 'true'
- name: Add dependency chart repos
if: steps.list-changed.outputs.changed == 'true'
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Install Prometheus Operator CRDs
if: steps.list-changed.outputs.changed == 'true'
run: |
helm install my-prometheus-operator-crds prometheus-community/prometheus-operator-crds --version 6.0.0
- name: Test charts
run: ct install --config ./operations/helm/ct.yaml
- name: Assert external HPA validation failure
run: |
set -e
cd operations/helm/charts/alloy
if helm template . --values ci/external-hpa-validation-failure.yaml > /dev/null 2>&1; then
echo "ERROR: expected helm template to fail due to mutually-exclusive flags" >&2
exit 1
fi
helm template . --values ci/external-hpa-validation-failure.yaml 2>&1 \
| grep -q "mutually exclusive" \
|| { echo "ERROR: helm template failed but error message did not match expected text" >&2; exit 1; }
echo "OK: external HPA validation fails with expected message"