Skip to content

Commit 572c737

Browse files
committed
formalize new versioning scheme and fix console nightlies
This commit formalizes the new version format of `$MAJOR.$MINOR-k8s$PATCH` for releases v25.1 and forwards. Changie has been configured to refer to versions in their semver format but will replace them with their `-k8s` alternative in the CHANGELOG itself. Version stamping has been moved to `./ci/script/version.sh` which provides a variety of options. ```bash ./ci/scripts/version.sh charts/console -e # v3.0-k8s0-beta.1-1-g760a015f ./ci/scripts/version.sh charts/console # v3.0.0-beta.1-1-g760a015f ./ci/scripts/version.sh charts/redpanda # v5.9.20-66-g92c19f4b ./ci/scripts/version.sh charts/redpanda -e # v5.9-k8s20-66-g92c19f4b ```
1 parent a90fba6 commit 572c737

File tree

8 files changed

+502
-388
lines changed

8 files changed

+502
-388
lines changed

.changie.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ unreleasedDir: unreleased
33
headerPath: header.tpl.md
44
changelogPath: CHANGELOG.md
55
versionExt: md
6-
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
6+
# This nasty regex reformats "internal versions" to "external versions" the
7+
# same way that ./ci/scripts/version.sh does.
8+
# v$MAJOR.$MINOR.$PATCH-$PREREL+$METADATA -> v$MAJOR.$MINOR-k8s$PATCH-$PREREL+$METADATA
9+
versionFormat: '## {{regexReplaceAll "^(v\\d+\\.\\d+)\\.(\\d+.*)$" .Version "${1}-k8s${2}"}} - {{.Time.Format "2006-01-02"}}'
710
kindFormat: '### {{.Kind}}'
811
changeFormat: '* {{.Body}}'
912
body:

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@ applying the "no-changelog" label.
7878

7979
To release any project in this repository:
8080
1. Mint the version and its CHANGELOG.md entry via `changie batch -j <project> <version>`
81+
- If minting a pre-release, specify `-k` to keep the unreleased changes in place for the official release.
8182
2. Run `task test:unit` and `task lint`, they will report additional required actions, if any.
8283
4. Commit the resultant diff with the commit message `<project>: cut release <version>` and rebase it into master via a Pull Request.
8384
5. Tag the above commit with as `<project>/v<version>` with `git tag $(changie latest -j <project>) <commit-sha>`.
84-
- If the operator is being released, also tag the same commit as `v<version>`.
85-
6. Push the tag(s).
86-
7. Create a Github [Release](https://github.com/redpanda-data/redpanda-operator/releases) on the redpanda-operator repo based on the entires in CHANGELOG.md associated with the Operator release tag.
85+
6. Push the tags.
86+
7. Create a [Release on GitHub](https://github.com/redpanda-data/redpanda-operator/releases)
87+
- Associate it with the tag pushed in the previous step.
88+
- Paste the contents of `.changes/<project>/<version>.md`, excluding the header, into the release notes field.
89+
- Use the header of `./changes/<project>/<version>.md` as the release name. e.g. `<project>: v42.8+k8s1`
8790

8891
## Nightly build
8992

Taskfile.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ vars:
3737
# `--always` is a fallback to print out the commit if no tag is found.
3838
# `sed` is used to trim off the qualifying parts of the tag so we just get the "version".
3939
OPERATOR_VERSION:
40-
sh: git describe --dirty --tags --match 'v*' --match 'operator/v*' | sed 's#^operator/##'
40+
sh: '{{.SRC_DIR}}/ci/scripts/version.sh operator'
4141
OPERATOR_CHART_VERSION:
4242
# NB: OPERATOR_CHART_VERSION is currently only used for the operator chart's nightly releases.
43-
sh: git describe --dirty --tags --match 'charts/operator/v*' --always | sed 's#^charts/operator/##'
43+
sh: '{{.SRC_DIR}}/ci/scripts/version.sh charts/operator'
4444
CONSOLE_CHART_VERSION:
4545
# NB: CONSOLE_CHART_VERSION is currently only used for the console chart's nightly releases.
46-
sh: git describe --dirty --tags --match 'charts/console/v*' --always | sed 's#^charts/console/##'
46+
sh: '{{.SRC_DIR}}/ci/scripts/version.sh charts/console -e'
4747

4848
includes:
4949
build: taskfiles/build.yml

charts/console/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type: application
3030
version: 0.7.31
3131

3232
# The app version is the version of the Chart application
33-
appVersion: v3.0.0
33+
appVersion: v3.0.0-beta.1
3434

3535
kubeVersion: ">= 1.25.0-0"
3636

charts/console/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
description: Find the default values and descriptions of settings in the Redpanda Console Helm chart.
44
---
55

6-
![Version: 0.7.31](https://img.shields.io/badge/Version-0.7.31-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0](https://img.shields.io/badge/AppVersion-v3.0.0-informational?style=flat-square)
6+
![Version: 0.7.31](https://img.shields.io/badge/Version-0.7.31-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0-beta.1](https://img.shields.io/badge/AppVersion-v3.0.0--beta.1-informational?style=flat-square)
77

88
This page describes the official Redpanda Console Helm Chart. In particular, this page describes the contents of the chart’s [`values.yaml` file](https://github.com/redpanda-data/helm-charts/blob/main/charts/console/values.yaml).
99
Each of the settings is listed and described on this page, along with any default values.

0 commit comments

Comments
 (0)