Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple Helm Release with the Operator Release #872

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.14.3

- name: Run chart-releaser for opensearch-cluster
uses: helm/[email protected]
with:
charts_dir: charts/opensearch-cluster
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
13 changes: 6 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,23 @@ jobs:
id: github-ver
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

prudhvigodithi marked this conversation as resolved.
Show resolved Hide resolved
- 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
- name: Run chart-releaser for opensearch-operator
uses: helm/[email protected]
with:
charts_dir: charts/
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: charts/opensearch-operator
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Create Release
uses: softprops/action-gh-release@v2
Expand Down
28 changes: 28 additions & 0 deletions charts/opensearch-cluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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` for the initial release after the helm release decouple.
### 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

8 changes: 6 additions & 2 deletions charts/opensearch-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions charts/opensearch-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ 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

# 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.
Expand Down