From edc1ebc183aa662eaae0bfdc98cd217c1821f5e1 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 16:44:25 -0600 Subject: [PATCH 01/14] Move linter to chart-testing --- .github/ct.yml | 4 ++++ .github/workflows/helm.yml | 11 +++++++++++ .github/workflows/molecule.yml | 5 ++++- charts/dataplane/Chart.yaml | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .github/ct.yml create mode 100644 .github/workflows/helm.yml diff --git a/.github/ct.yml b/.github/ct.yml new file mode 100644 index 0000000..f60a6f4 --- /dev/null +++ b/.github/ct.yml @@ -0,0 +1,4 @@ +--- +helm-extra-args: --all +check-version-increment: true +validate-maintainers: false diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml new file mode 100644 index 0000000..4b0f3b8 --- /dev/null +++ b/.github/workflows/helm.yml @@ -0,0 +1,11 @@ +--- +lint-chart: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v1 + - name: lint + uses: helm/chart-testing-action@master + with: + command: lint + config: .github/ct.yaml diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 78bfd6c..d454aa9 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -25,7 +25,10 @@ jobs: uses: azure/setup-kubectl@v3 - name: lint chart - run: helm lint charts/dataplane + uses: helm/chart-testing-action@master + with: + command: lint + config: .github/ct.yaml molecule: diff --git a/charts/dataplane/Chart.yaml b/charts/dataplane/Chart.yaml index 96d03d9..e9e10dd 100644 --- a/charts/dataplane/Chart.yaml +++ b/charts/dataplane/Chart.yaml @@ -22,4 +22,4 @@ version: 0.0.6 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.0.6" +appVersion: "0.0.7" From 6b5fc882191fd643232e6272cdc7920f444ad3b4 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 16:48:50 -0600 Subject: [PATCH 02/14] Add release action --- .github/workflows/helm.yml | 11 ----------- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .github/workflows/helm.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml deleted file mode 100644 index 4b0f3b8..0000000 --- a/.github/workflows/helm.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -lint-chart: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v1 - - name: lint - uses: helm/chart-testing-action@master - with: - command: lint - config: .github/ct.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..240b02c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +--- +name: release chart + +on: + push: + branches: + - master + paths: + - 'charts/**' + +jobs: + + release: + runs-on: ubuntu-latest + steps: + + - name: checkout + uses: actions/checkout@v1 + + - name: configure git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: release chart + uses: helm/chart-releaser-action@master From a0d3f03ccb41cd821e233997f70fd49f7a51122d Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 16:50:25 -0600 Subject: [PATCH 03/14] Bump chart release to 0.0.8 --- charts/dataplane/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/dataplane/Chart.yaml b/charts/dataplane/Chart.yaml index e9e10dd..36a53e1 100644 --- a/charts/dataplane/Chart.yaml +++ b/charts/dataplane/Chart.yaml @@ -22,4 +22,4 @@ version: 0.0.6 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.0.7" +appVersion: "0.0.8" From cee6b4d362bd6fdfefe13f9243757a918bcd5585 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 16:59:36 -0600 Subject: [PATCH 04/14] Refactor lint ci tasks --- .github/workflows/molecule.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index d454aa9..e52e264 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -24,11 +24,24 @@ jobs: - name: install kubectl uses: azure/setup-kubectl@v3 - - name: lint chart - uses: helm/chart-testing-action@master + - uses: actions/setup-python@v4 with: - command: lint - config: .github/ct.yaml + python-version: '3.9' + check-latest: true + + - name: set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + + - name: run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainer=false molecule: From ead7c1bd73550802db121e57e64f1bc6c634af95 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:02:26 -0600 Subject: [PATCH 05/14] Refactor lint ci tasks --- .github/workflows/molecule.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index e52e264..949d0b0 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -32,15 +32,7 @@ jobs: - name: set up chart-testing uses: helm/chart-testing-action@v2.3.1 - - name: run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) + - name: lint charts run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainer=false molecule: From b929e8ea38d7b5873d5c8aff050b94d95f10da22 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:03:21 -0600 Subject: [PATCH 06/14] Refactor lint ci tasks --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 949d0b0..1180b28 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -33,7 +33,7 @@ jobs: uses: helm/chart-testing-action@v2.3.1 - name: lint charts - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainer=false + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false molecule: From 5c60de304a397c398c16dc44995bcd4294a62ed3 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:07:01 -0600 Subject: [PATCH 07/14] Refactor lint ci tasks --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 1180b28..7bcf6dd 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -33,7 +33,7 @@ jobs: uses: helm/chart-testing-action@v2.3.1 - name: lint charts - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false --chart-dirs ./charts --all molecule: From 399f8b9fed7bab23bc057213208ff102cd477d86 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:13:29 -0600 Subject: [PATCH 08/14] Add ci debug output --- .github/workflows/molecule.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 7bcf6dd..6876af5 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -32,6 +32,9 @@ jobs: - name: set up chart-testing uses: helm/chart-testing-action@v2.3.1 + - name: debug path + run: ls $GITHUB_WORKSPACE + - name: lint charts run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false --chart-dirs ./charts --all From d835fff11d8fa468701b8abe86817d6b39e591a9 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:15:12 -0600 Subject: [PATCH 09/14] Refactor lint ci tasks --- .github/workflows/molecule.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 6876af5..e8575d6 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -32,11 +32,8 @@ jobs: - name: set up chart-testing uses: helm/chart-testing-action@v2.3.1 - - name: debug path - run: ls $GITHUB_WORKSPACE - - name: lint charts - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false --chart-dirs ./charts --all + run: ct lint --chart-dirs $GITHUB_WORKSPACE/charts --all --validate-maintainers=false molecule: From 2c222bfe88894c0a78d0ed8d47c513a89e131004 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Fri, 17 Feb 2023 17:16:16 -0600 Subject: [PATCH 10/14] Fix lint errors --- charts/dataplane/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/dataplane/values.yaml b/charts/dataplane/values.yaml index f822cdc..973e3a4 100644 --- a/charts/dataplane/values.yaml +++ b/charts/dataplane/values.yaml @@ -13,8 +13,8 @@ util: cdc: - postgres: [] - mysql: [] + postgres: [] + mysql: [] strimzi: From e474efbee844d2c7f23e779df8dbf1befee948a2 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 21 Feb 2023 12:16:45 -0600 Subject: [PATCH 11/14] Refactor action workflow definitions --- .github/ct.yml | 4 ---- .github/workflows/lint.yml | 42 ++++++++++++++++++++++++++++++++++ .github/workflows/molecule.yml | 27 ++++------------------ .github/workflows/release.yml | 8 +++++++ 4 files changed, 54 insertions(+), 27 deletions(-) delete mode 100644 .github/ct.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/ct.yml b/.github/ct.yml deleted file mode 100644 index f60a6f4..0000000 --- a/.github/ct.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -helm-extra-args: --all -check-version-increment: true -validate-maintainers: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..cf09108 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,42 @@ +--- +name: lint + +on: + + pull_request: + branches: + - master + paths: + - 'charts/**' + push: + branches: + - master + paths: + - 'charts/**' + schedule: + - cron: "0 5 * * 5" + +jobs: + + lint: + + name: lint + runs-on: ubuntu-latest + steps: + + - name: check out the codebase + uses: actions/checkout@v2 + + - name: install kubectl + uses: azure/setup-kubectl@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + check-latest: true + + - name: set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + + - name: lint charts + run: ct lint --chart-dirs $GITHUB_WORKSPACE/charts --all --validate-maintainers=false diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index e8575d6..a8a34f7 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -4,37 +4,18 @@ name: molecule on: pull_request: + paths: + - 'charts/**' push: branches: - master + paths: + - 'charts/**' schedule: - cron: "0 5 * * 5" jobs: - lint: - - name: lint - runs-on: ubuntu-latest - steps: - - - name: check out the codebase - uses: actions/checkout@v2 - - - name: install kubectl - uses: azure/setup-kubectl@v3 - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - check-latest: true - - - name: set up chart-testing - uses: helm/chart-testing-action@v2.3.1 - - - name: lint charts - run: ct lint --chart-dirs $GITHUB_WORKSPACE/charts --all --validate-maintainers=false - molecule: name: molecule diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 240b02c..5667e4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,12 @@ name: release chart on: + + pull_request: + branches: + - master + paths: + - 'charts/**' push: branches: - master @@ -24,3 +30,5 @@ jobs: - name: release chart uses: helm/chart-releaser-action@master + env: + CR_TOKEN: '${{ secrets.GH_TOKEN }}' From 6994a5b053c5a977f83132ed81f66c92812b350f Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 21 Feb 2023 12:34:10 -0600 Subject: [PATCH 12/14] Fix workflow action version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5667e4a..7352be6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,6 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: release chart - uses: helm/chart-releaser-action@master + uses: helm/chart-releaser-action@1.5.0 env: CR_TOKEN: '${{ secrets.GH_TOKEN }}' From e03d542369c2f4ab4a188f181cba7477a3fc31a3 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 21 Feb 2023 12:38:48 -0600 Subject: [PATCH 13/14] Fix workflow action triggers --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf09108..c1c9321 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,11 +8,13 @@ on: - master paths: - 'charts/**' + - '.github/workflows/lint.yml' push: branches: - master paths: - 'charts/**' + - '.github/workflows/lint.yml' schedule: - cron: "0 5 * * 5" From 90a9c16ea0d203b9b0eb0f31a6242f9745a217e9 Mon Sep 17 00:00:00 2001 From: Ted Cook Date: Tue, 21 Feb 2023 12:54:01 -0600 Subject: [PATCH 14/14] Fix workflow action version --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7352be6..d1d0a91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,11 +8,13 @@ on: - master paths: - 'charts/**' + - '.github/workflows/release.yml' push: branches: - master paths: - 'charts/**' + - '.github/workflows/release.yml' jobs: @@ -29,6 +31,6 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: release chart - uses: helm/chart-releaser-action@1.5.0 + uses: helm/chart-releaser-action@v1.5.0 env: CR_TOKEN: '${{ secrets.GH_TOKEN }}'