From b9e77575bed2858174bc2e382b4aa4ed6fd091c7 Mon Sep 17 00:00:00 2001 From: georgekaz Date: Wed, 14 Jul 2021 20:10:41 +0100 Subject: [PATCH] Chart changes merged,not deployed,iterate version (#2111) * Chart changes merged,not deployed,iterate version kyverno#2073 - Updates chart version to v1.4.2 - merged 13 days ago but not deployed kyverno#2081 - Fix Helm release during tag - merged 9 days ago kyverno#2037 - updated chart contents but not chart version - not released - merged 7 days ago kyverno#2103 - updated chart contents but not chart version - not released - merged 3 hours ago Status - main branch shows chart version is v1.4.2, git tag is v1.4.1 and latest helm chart on artifacthub.io/packages/helm/kyverno/kyverno is v1.4.1 This PR just iterates the chart version so that it's built, but I think chart versions should be incremented as part of the normal PR/merge process if chart elements are changed Signed-off-by: George Kaz * break the helm release out into it's own workflows Signed-off-by: George Kaz * workflow fixes Signed-off-by: George Kaz * don't run helm-release on PR. Remove git config bit Signed-off-by: George Kaz --- .github/workflows/build.yaml | 20 ------------------ .github/workflows/helm-release.yaml | 21 +++++++++++++++++++ .github/workflows/helm-test.yaml | 32 +++++++++++++++++++++++++++++ .github/workflows/release.yaml | 15 -------------- charts/kyverno/Chart.yaml | 2 +- 5 files changed, 54 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/helm-release.yaml create mode 100644 .github/workflows/helm-test.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 87747a330b..68ac4be20f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -173,23 +173,3 @@ jobs: run: | export PROJECT_PATH=$(pwd) make test-unit - - helm-tests: - runs-on: ubuntu-latest - needs: pre-checks - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.0.1 - - - name: Run chart-testing (lint) - run: ct lint --target-branch=main --check-version-increment=false diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml new file mode 100644 index 0000000000..1da0e58a9a --- /dev/null +++ b/.github/workflows/helm-release.yaml @@ -0,0 +1,21 @@ +name: helm-release +on: + push: + branches: + - 'main' + paths: + - 'charts/kyverno/Chart.yaml' + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + + - name: Run chart-releaser + uses: stefanprodan/helm-gh-pages@v1.4.1 + with: + token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml new file mode 100644 index 0000000000..25b96501a8 --- /dev/null +++ b/.github/workflows/helm-test.yaml @@ -0,0 +1,32 @@ +name: helm-test +on: + push: + branches: + - 'main' + paths: + - 'charts/kyverno/**' + pull_request: + branches: + - 'main' + paths: + - 'charts/kyverno/**' + +jobs: + helm-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Unshallow + run: git fetch --prune --unshallow + + - uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + + - name: Run chart-testing (lint) + run: ct lint --target-branch=main --check-version-increment=true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0ded6371fa..8b0ab98c04 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -166,21 +166,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v1 - with: - version: v3.4.0 - - - name: Run chart-releaser - uses: stefanprodan/helm-gh-pages@master - with: - token: "${{ secrets.GITHUB_TOKEN }}" - release-cli-via-krew: runs-on: ubuntu-latest needs: create-release diff --git a/charts/kyverno/Chart.yaml b/charts/kyverno/Chart.yaml index b297190a41..4a0f23f6ca 100644 --- a/charts/kyverno/Chart.yaml +++ b/charts/kyverno/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: kyverno -version: v1.4.2 +version: v1.4.3 appVersion: v1.4.1 icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png description: Kubernetes Native Policy Management