mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 20:41:38 +02:00
* build(deps): bump helm-diff to v3.15.13 Update helm-diff plugin version from v3.15.12 to v3.15.13 across Dockerfiles, recommended version constant, CI matrix, and integration test default. Signed-off-by: yxxhero <aiopsclub@163.com> * fix(ci): add golden files for helm-diff >= 3.15.13 helm-diff v3.15.13 omits null/empty labels and annotations keys from diffs (databus23/helm-diff#1068), which broke the suppress-output-line- regex integration test: the ValidatingWebhookConfiguration manifest no longer renders a bare 'annotations:' key under metadata. Add new golden files suffixed -after-helm-diff-3.15.13 (helm3, helm4, live variants) and select them via version_ge in the test case, keeping the existing 3.11.0 and pre-3.11.0 goldens for older plugin versions. Signed-off-by: yxxhero <aiopsclub@163.com> * refactor(test): drop legacy helm-diff golden files CI only exercises the recommended helm-diff version, so replace the version-suffixed golden files (-after-helm-diff-3.11.0, -after-helm-diff-3.15.13) with a single set of base golden files (diff, diff-live, diff-helm4, diff-live-helm4) containing the v3.15.13 output, and remove the now-dead version gating. Also drop the 'install semver' CI step, whose only consumer was the removed gating. Signed-off-by: yxxhero <aiopsclub@163.com> * fix(test): remove helm-diff version gating from golden file selection The previous commit deleted the version-suffixed golden files but the selection gating was accidentally left behind, making the test reference non-existent files for helm-diff >= 3.15.13. Signed-off-by: yxxhero <aiopsclub@163.com> --------- Signed-off-by: yxxhero <aiopsclub@163.com>
192 lines
6.2 KiB
YAML
192 lines
6.2 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: ['**.md', '**/docs/**']
|
|
pull_request:
|
|
branches: [main]
|
|
paths-ignore: ['**.md', '**/docs/**']
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Free Disk Space
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: true
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: false
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: check disk usage
|
|
run: df -h
|
|
- uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: v2.11.4
|
|
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
helm-version: [v3.18.6, v3.22.0, v4.3.0]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Free Disk Space
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: true
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: false
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: check disk usage
|
|
run: df -h
|
|
- uses: azure/setup-helm@v5.0.1
|
|
with:
|
|
version: ${{ matrix.helm-version }}
|
|
- name: Build
|
|
run: make build build-test-tools
|
|
- name: Test
|
|
run: make check test
|
|
env:
|
|
HELMFILE_HELM4: ${{ startsWith(matrix.helm-version, 'v4') && '1' || '0' }}
|
|
- name: Archive built binaries
|
|
if: matrix.helm-version == 'v4.3.0'
|
|
run: tar -cvf built-binaries.tar helmfile diff-yamls dyff
|
|
- uses: actions/upload-artifact@v7
|
|
if: matrix.helm-version == 'v4.3.0'
|
|
with:
|
|
name: built-binaries-${{ github.run_id }}
|
|
path: built-binaries.tar
|
|
retention-days: 1
|
|
- name: Display built binaries
|
|
if: matrix.helm-version == 'v4.3.0'
|
|
run: ls -l helmfile diff-yamls dyff
|
|
|
|
integration_tests:
|
|
needs: tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# Helm maintains the latest minor version only and therefore each Helmfile version supports 2 Helm minor versions.
|
|
# That's why we cover only 2 Helm minor versions in this matrix.
|
|
# See https://github.com/helmfile/helmfile/pull/286#issuecomment-1250161182 for more context.
|
|
# We assume that the helm-secrets plugin is supposed to
|
|
# work with the two most recent helm minor versions.
|
|
# Once it turned out to be not practically true,
|
|
# we will mark this combination as failable,
|
|
# and instruct users to upgrade helm and helm-secrets at once.
|
|
- helm-version: v3.18.6
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: ''
|
|
# In case you need to test some optional helmfile features,
|
|
# enable it via extra-helmfile-flags below.
|
|
- helm-version: v3.18.6
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: '--enable-live-output'
|
|
- helm-version: v3.22.0
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: ''
|
|
- helm-version: v3.22.0
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: '--enable-live-output'
|
|
# Helmfile now supports both Helm 3.x and Helm 4.x
|
|
- helm-version: v4.3.0
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: ''
|
|
- helm-version: v4.3.0
|
|
kustomize-version: v5.8.0
|
|
plugin-secrets-version: 4.7.4
|
|
plugin-diff-version: 3.15.13
|
|
extra-helmfile-flags: '--enable-live-output'
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Free Disk Space
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: true
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: false
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: check disk usage
|
|
run: df -h
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: built-binaries-${{ github.run_id }}
|
|
- name: Extract tar to get built binaries
|
|
run: tar -xvf built-binaries.tar
|
|
- name: Display built binaries
|
|
run: ls -l helmfile diff-yamls dyff
|
|
|
|
- name: Install test dependencies
|
|
env:
|
|
HELM_VERSION: ${{ matrix.helm-version }}
|
|
KUSTOMIZE_VERSION: ${{ matrix.kustomize-version }}
|
|
run: make -C .github/workflows helm vault sops kustomize
|
|
- name: Start minikube
|
|
uses: medyagh/setup-minikube@latest
|
|
with:
|
|
kubernetes-version: v1.34.0
|
|
- name: Execute integration tests
|
|
run: make integration
|
|
env:
|
|
HELM_SECRETS_VERSION: ${{ matrix.plugin-secrets-version }}
|
|
HELM_DIFF_VERSION: ${{ matrix.plugin-diff-version }}
|
|
HELMFILE_HELM4: ${{ startsWith(matrix.helm-version, 'v4') && '1' || '0' }}
|
|
TERM: xterm
|
|
EXTRA_HELMFILE_FLAGS: ${{ matrix.extra-helmfile-flags }}
|
|
|
|
e2e_tests:
|
|
needs: tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: built-binaries-${{ github.run_id }}
|
|
- name: Extract tar to get built binaries
|
|
run: tar -xvf built-binaries.tar
|
|
- name: Display built binaries
|
|
run: ls -l helmfile diff-yamls dyff
|
|
- name: Install package
|
|
run: sudo apt-get -y install expect
|
|
- name: Run helmfile init
|
|
run: bash test/e2e/helmfile-init/init_linux.sh
|
|
env:
|
|
TERM: xterm
|