From 49188c90d2dcbc15c5860dd2f983659146cd1bdb Mon Sep 17 00:00:00 2001 From: tarteo Date: Wed, 18 Dec 2024 17:20:55 +0100 Subject: [PATCH] gh workflow helm release Update version gh helm release workflow gh helm release workflow gh helm release workflow gh helm release workflow gh helm release workflow --- .github/workflows/helm-release.yml | 37 +++++++++++++++++++ .github/workflows/lint.yml | 23 ------------ .github/workflows/test-e2e.yml | 35 ------------------ .github/workflows/test.yml | 23 ------------ {chart => helm/chart}/.helmignore | 0 {chart => helm/chart}/Chart.yaml | 4 +- {chart => helm/chart}/templates/_helpers.tpl | 0 .../chart}/templates/bucket-crd.yaml | 0 .../chart}/templates/bucket-editor-rbac.yaml | 0 .../chart}/templates/bucket-viewer-rbac.yaml | 0 .../chart}/templates/deployment.yaml | 0 .../templates/leader-election-rbac.yaml | 0 .../chart}/templates/manager-rbac.yaml | 0 .../chart}/templates/metrics-auth-rbac.yaml | 0 .../chart}/templates/metrics-reader-rbac.yaml | 0 .../chart}/templates/metrics-service.yaml | 0 .../chart}/templates/serviceaccount.yaml | 0 {chart => helm/chart}/values.yaml | 0 18 files changed, 39 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/helm-release.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/test-e2e.yml delete mode 100644 .github/workflows/test.yml rename {chart => helm/chart}/.helmignore (100%) rename {chart => helm/chart}/Chart.yaml (96%) rename {chart => helm/chart}/templates/_helpers.tpl (100%) rename {chart => helm/chart}/templates/bucket-crd.yaml (100%) rename {chart => helm/chart}/templates/bucket-editor-rbac.yaml (100%) rename {chart => helm/chart}/templates/bucket-viewer-rbac.yaml (100%) rename {chart => helm/chart}/templates/deployment.yaml (100%) rename {chart => helm/chart}/templates/leader-election-rbac.yaml (100%) rename {chart => helm/chart}/templates/manager-rbac.yaml (100%) rename {chart => helm/chart}/templates/metrics-auth-rbac.yaml (100%) rename {chart => helm/chart}/templates/metrics-reader-rbac.yaml (100%) rename {chart => helm/chart}/templates/metrics-service.yaml (100%) rename {chart => helm/chart}/templates/serviceaccount.yaml (100%) rename {chart => helm/chart}/values.yaml (100%) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml new file mode 100644 index 0000000..0b9cd80 --- /dev/null +++ b/.github/workflows/helm-release.yml @@ -0,0 +1,37 @@ +name: Release Helm Chart + +on: + push: + paths: + - "helm/chart/Chart.yaml" + branches: + - main + +jobs: + release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.1.0 + with: + fetch-depth: 0 + + - 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@v3.4 + with: + version: v3.4.2 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.4.1 + with: + charts_dir: helm + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_RELEASE_NAME_TEMPLATE: "helm-{{ .Version }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index f40d365..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Lint - -on: - push: - pull_request: - -jobs: - lint: - name: Run on Ubuntu - runs-on: ubuntu-latest - steps: - - name: Clone the code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '~1.22' - - - name: Run linter - uses: golangci/golangci-lint-action@v6 - with: - version: v1.61 diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml deleted file mode 100644 index 8780644..0000000 --- a/.github/workflows/test-e2e.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: E2E Tests - -on: - push: - pull_request: - -jobs: - test-e2e: - name: Run on Ubuntu - runs-on: ubuntu-latest - steps: - - name: Clone the code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '~1.22' - - - name: Install the latest version of kind - run: | - curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 - chmod +x ./kind - sudo mv ./kind /usr/local/bin/kind - - - name: Verify kind installation - run: kind version - - - name: Create kind cluster - run: kind create cluster - - - name: Running Test e2e - run: | - go mod tidy - make test-e2e diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 7baf657..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Tests - -on: - push: - pull_request: - -jobs: - test: - name: Run on Ubuntu - runs-on: ubuntu-latest - steps: - - name: Clone the code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '~1.22' - - - name: Running Tests - run: | - go mod tidy - make test diff --git a/chart/.helmignore b/helm/chart/.helmignore similarity index 100% rename from chart/.helmignore rename to helm/chart/.helmignore diff --git a/chart/Chart.yaml b/helm/chart/Chart.yaml similarity index 96% rename from chart/Chart.yaml rename to helm/chart/Chart.yaml index e88205c..b3e1e42 100644 --- a/chart/Chart.yaml +++ b/helm/chart/Chart.yaml @@ -13,9 +13,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.0 +version: 1.1.0 # This is the version number of the application being deployed. This version number should be # 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: "1.0.0" +appVersion: "1.1.0" diff --git a/chart/templates/_helpers.tpl b/helm/chart/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to helm/chart/templates/_helpers.tpl diff --git a/chart/templates/bucket-crd.yaml b/helm/chart/templates/bucket-crd.yaml similarity index 100% rename from chart/templates/bucket-crd.yaml rename to helm/chart/templates/bucket-crd.yaml diff --git a/chart/templates/bucket-editor-rbac.yaml b/helm/chart/templates/bucket-editor-rbac.yaml similarity index 100% rename from chart/templates/bucket-editor-rbac.yaml rename to helm/chart/templates/bucket-editor-rbac.yaml diff --git a/chart/templates/bucket-viewer-rbac.yaml b/helm/chart/templates/bucket-viewer-rbac.yaml similarity index 100% rename from chart/templates/bucket-viewer-rbac.yaml rename to helm/chart/templates/bucket-viewer-rbac.yaml diff --git a/chart/templates/deployment.yaml b/helm/chart/templates/deployment.yaml similarity index 100% rename from chart/templates/deployment.yaml rename to helm/chart/templates/deployment.yaml diff --git a/chart/templates/leader-election-rbac.yaml b/helm/chart/templates/leader-election-rbac.yaml similarity index 100% rename from chart/templates/leader-election-rbac.yaml rename to helm/chart/templates/leader-election-rbac.yaml diff --git a/chart/templates/manager-rbac.yaml b/helm/chart/templates/manager-rbac.yaml similarity index 100% rename from chart/templates/manager-rbac.yaml rename to helm/chart/templates/manager-rbac.yaml diff --git a/chart/templates/metrics-auth-rbac.yaml b/helm/chart/templates/metrics-auth-rbac.yaml similarity index 100% rename from chart/templates/metrics-auth-rbac.yaml rename to helm/chart/templates/metrics-auth-rbac.yaml diff --git a/chart/templates/metrics-reader-rbac.yaml b/helm/chart/templates/metrics-reader-rbac.yaml similarity index 100% rename from chart/templates/metrics-reader-rbac.yaml rename to helm/chart/templates/metrics-reader-rbac.yaml diff --git a/chart/templates/metrics-service.yaml b/helm/chart/templates/metrics-service.yaml similarity index 100% rename from chart/templates/metrics-service.yaml rename to helm/chart/templates/metrics-service.yaml diff --git a/chart/templates/serviceaccount.yaml b/helm/chart/templates/serviceaccount.yaml similarity index 100% rename from chart/templates/serviceaccount.yaml rename to helm/chart/templates/serviceaccount.yaml diff --git a/chart/values.yaml b/helm/chart/values.yaml similarity index 100% rename from chart/values.yaml rename to helm/chart/values.yaml