From 6cf9a30cd74b539dbcd94da93f02b338c9c75c3a Mon Sep 17 00:00:00 2001 From: Prudhvi Godithi Date: Tue, 17 Sep 2024 10:07:05 -0700 Subject: [PATCH] Decouple Helm Release Signed-off-by: Prudhvi Godithi --- .github/workflows/helm-release.yaml | 33 +++++++++++++++++++++++++ .github/workflows/release.yaml | 18 -------------- charts/opensearch-cluster/CHANGELOG.md | 28 +++++++++++++++++++++ charts/opensearch-cluster/Chart.yaml | 8 ++++-- charts/opensearch-operator/CHANGELOG.md | 15 ++++++++++- charts/opensearch-operator/Chart.yaml | 8 +++--- 6 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/helm-release.yaml create mode 100644 charts/opensearch-cluster/CHANGELOG.md diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml new file mode 100644 index 00000000..53a402b3 --- /dev/null +++ b/.github/workflows/helm-release.yaml @@ -0,0 +1,33 @@ +name: Release Helm Charts + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + 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@v1 + with: + version: v3.7.0 + + # See https://github.com/helm/chart-releaser + # See https://github.com/helm/chart-releaser-action + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 23ed9b26..d3b84aba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,24 +24,6 @@ jobs: run: | echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - - name: Make sure helm chart has correct versions - run: | - sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml - sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml - sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml - sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml - - - name: Install Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - - - name: Publish helm chart - uses: stefanprodan/helm-gh-pages@master - with: - charts_dir: charts/ - token: ${{ secrets.GITHUB_TOKEN }} - - name: Create Release uses: softprops/action-gh-release@v2 id: create_release diff --git a/charts/opensearch-cluster/CHANGELOG.md b/charts/opensearch-cluster/CHANGELOG.md new file mode 100644 index 00000000..6065a069 --- /dev/null +++ b/charts/opensearch-cluster/CHANGELOG.md @@ -0,0 +1,28 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- +## [Unreleased] +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- + +## [2.6.1] +### Added +### Changed +- Updated `version` and `appVersion` to 2.6.1. +### Deprecated +### Removed +### Fixed +### Security + +[Unreleased]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-2.6.1...HEAD +[2.6.1]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-2.6.0...opensearch-operator-2.6.1 + diff --git a/charts/opensearch-cluster/Chart.yaml b/charts/opensearch-cluster/Chart.yaml index fe92e924..294ebdc9 100644 --- a/charts/opensearch-cluster/Chart.yaml +++ b/charts/opensearch-cluster/Chart.yaml @@ -2,5 +2,9 @@ apiVersion: v2 name: opensearch-cluster description: A Helm chart for OpenSearch Cluster type: application -version: 2.6.0 -appVersion: 2.6.0 + +## The opensearch-cluster Helm Chart version +version: 2.6.1 + +## The operator version +appVersion: 2.6.1 diff --git a/charts/opensearch-operator/CHANGELOG.md b/charts/opensearch-operator/CHANGELOG.md index 1866ab55..b96a77ff 100644 --- a/charts/opensearch-operator/CHANGELOG.md +++ b/charts/opensearch-operator/CHANGELOG.md @@ -15,6 +15,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security --- + +## [2.6.1] +### Added +### Changed +- Updated `version` and `appVersion` to 2.6.1. +### Deprecated +### Removed +### Fixed +### Security + +--- + ## [2.0.0] ### Added ### Changed @@ -55,7 +67,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-2.0.0...HEAD +[Unreleased]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-2.6.1...HEAD +[2.6.1]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-2.6.0...opensearch-operator-2.6.1 [2.0.0]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-1.0.3...opensearch-operator-2.0.0 [1.0.3]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-1.0.2...opensearch-operator-1.0.3 [1.0.2]: https://github.com/opensearch-project/opensearch-k8s-operator/compare/opensearch-operator-1.0.1...opensearch-operator-1.0.2 diff --git a/charts/opensearch-operator/Chart.yaml b/charts/opensearch-operator/Chart.yaml index 2cf3b638..d786f3aa 100644 --- a/charts/opensearch-operator/Chart.yaml +++ b/charts/opensearch-operator/Chart.yaml @@ -12,13 +12,13 @@ description: The OpenSearch Operator Helm chart for Kubernetes # pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application -# This is the chart version. This version number should be incremented each time you make changes +# This is the opensearch-operator 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: 2.6.0 +version: 2.6.1 -# This is the version number of the application being deployed. This version number should be +# This is the version number of the application being deployed (the operator). 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: 2.6.0 +appVersion: 2.6.1