fix(helm): Don't fail for missing bucket name, if local disk is used. #5942
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: helm-ci | |
| on: | |
| pull_request: | |
| paths: | |
| - "production/helm/**" | |
| - ".github/workflows/helm-ci.yml" | |
| env: | |
| CT_CONFIGFILE: production/helm/ct.yaml | |
| INTEGRARION_TESTS_DIR: production/helm/loki/test/integration | |
| jobs: | |
| # Temporarily disabled linting because this step doesn't easily support passing GO tags yet. | |
| # call-lint: | |
| # permissions: | |
| # contents: "read" | |
| # id-token: "write" | |
| # pull-requests: "write" | |
| # uses: grafana/helm-charts/.github/workflows/linter.yml@main | |
| # with: | |
| # filter_regex_include: .*production/helm/loki/.* | |
| # golang_ci_lint_file: production/helm/loki/.golangci.yaml | |
| call-test: | |
| name: Test Helm Chart | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| pull-requests: "write" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Helm | |
| uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4 | |
| with: | |
| version: v3.8.2 | |
| # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | |
| # yamllint (https://github.com/adrienverge/yamllint) which require Python | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0 | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --config "${CT_CONFIGFILE}") | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Run chart-testing (lint) | |
| run: ct lint --config "${CT_CONFIGFILE}" --check-version-increment=false | |
| timeout-minutes: 10 | |
| - name: Create kind cluster | |
| uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 | |
| if: steps.list-changed.outputs.changed == 'true' | |
| - name: Install prometheus operator | |
| id: install-prometheus | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| kubectl create namespace prometheus | |
| helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
| helm install --debug prometheus prometheus-community/kube-prometheus-stack \ | |
| --namespace prometheus \ | |
| --set grafana.enabled=false \ | |
| --set prometheus.prometheusSpec.serviceMonitorSelector.matchLabels.release=prometheus \ | |
| --set prometheus.prometheusSpec.scrapeConfigNamespaceSelector.matchLabels.release=prometheus | |
| kubectl --namespace prometheus get pods -l "release=prometheus" | |
| kubectl --namespace prometheus get services -l "release=prometheus" | |
| - name: Run chart-testing (install) | |
| run: | | |
| changed=$(ct list-changed --config "${CT_CONFIGFILE}") | |
| if [[ "$changed" == "charts/enterprise-metrics" ]]; then | |
| # Do not run `ct install` for enterprise-metrics | |
| exit 0 | |
| fi | |
| ct install --config "${CT_CONFIGFILE}" | |
| list-integration-tests: | |
| name: List integration tests | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tests: ${{ steps.list_tests.outputs.tests }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| persist-credentials: 'false' | |
| - name: List tests | |
| id: list_tests | |
| working-directory: "${{ env.INTEGRARION_TESTS_DIR }}" | |
| env: | |
| LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} | |
| run: | | |
| tests=$(find . -name test-plan.yaml -exec dirname {} \; | sed -e "s/^\.\///g") | |
| echo "Tests: ${tests}" | |
| echo "tests=$(echo "${tests}" | jq --raw-input --slurp --compact-output 'split("\n") | map(select(. != ""))')" >> "${GITHUB_OUTPUT}" | |
| run-integration-tests: | |
| name: Integration Test | |
| needs: list-integration-tests | |
| runs-on: ubuntu-latest | |
| if: needs.list-integration-tests.outputs.tests != '[]' | |
| strategy: | |
| matrix: | |
| test: ${{ fromJson(needs.list-integration-tests.outputs.tests) }} | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: source | |
| persist-credentials: 'false' | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: helm-chart-toolbox | |
| repository: grafana/helm-chart-toolbox | |
| persist-credentials: 'false' | |
| - name: Set up Helm | |
| uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 | |
| - name: Install Flux CLI | |
| uses: fluxcd/flux2/action@6bf37f6a560fd84982d67f853162e4b3c2235edb # v2.6.4 | |
| - name: Install Kind CLI | |
| uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 | |
| with: | |
| install_only: true | |
| - name: Install Minikube CLI | |
| uses: medyagh/setup-minikube@e3c7f79eb1e997eabccc536a6cf318a2b0fe19d9 # v0.0.20 | |
| with: | |
| start: false | |
| - name: Run test | |
| run: helm-chart-toolbox/tools/helm-test/helm-test "${TEST_DIRECTORY}" | |
| env: | |
| TEST_DIRECTORY: "source/${{ env.INTEGRARION_TESTS_DIR }}/${{ matrix.test }}" | |
| DELETE_CLUSTER: true |