Skip to content

chore: bump prerelease versions for prerelease#510

Merged
holyspectral merged 1 commit into
rancher-sandbox:mainfrom
holyspectral:enable-release-pre-release-charts
Apr 9, 2026
Merged

chore: bump prerelease versions for prerelease#510
holyspectral merged 1 commit into
rancher-sandbox:mainfrom
holyspectral:enable-release-pre-release-charts

Conversation

@holyspectral

@holyspectral holyspectral commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

===Updated Apr. 02===

The previous approach doesn't consider the updatecli PR to update chart version. A separate updatecli file is added to make sure we can bump chart version for pre-release as well.

0.5.0 => 0.13.0-rc1

PR to bump a pre-release version: holyspectral#38

$ helm search repo holyspectral --devel -l
NAME                         	CHART VERSION               	APP VERSION	DESCRIPTION                              
holyspectral/runtime-enforcer	0.1.8-prerelease-v0.13.0-rc1	v0.13.0-rc1	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.7                       	v0.5.0     	SUSE Security Runtime Enforcer helm chart

0.13.0-rc1 => 0.13.0-rc2

PR to bump a pre-release version: holyspectral#39

$ helm search repo holyspectral --devel -l
NAME                         	CHART VERSION               	APP VERSION	DESCRIPTION                              

holyspectral/runtime-enforcer	0.1.8-prerelease-v0.13.0-rc2	v0.13.0-rc2	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.8-prerelease-v0.13.0-rc1	v0.13.0-rc1	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.7                       	v0.5.0     	SUSE Security Runtime Enforcer helm chart

0.13.0-rc2 => 0.13.0

PR to bump a official version: https://github.com/holyspectral/runtime-enforcer/pull/40/changes

$ helm search repo holyspectral --devel -l
NAME                         	CHART VERSION               	APP VERSION	DESCRIPTION                              
holyspectral/runtime-enforcer	0.1.8                       	v0.13.0    	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.8-prerelease-v0.13.0-rc2	v0.13.0-rc2	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.8-prerelease-v0.13.0-rc1	v0.13.0-rc1	SUSE Security Runtime Enforcer helm chart
holyspectral/runtime-enforcer	0.1.7                       	v0.5.0     	SUSE Security Runtime Enforcer helm chart

=== V1 ===

Enable publishing pre-release charts.

$ helm search repo holyspectral/ --devel
NAME                         	CHART VERSION	APP VERSION	DESCRIPTION                              
holyspectral/runtime-enforcer	0.2.0-rc2    	v0.5.0     	SUSE Security Runtime Enforcer helm chart

Which issue(s) this PR fixes

fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@holyspectral holyspectral self-assigned this Mar 31, 2026
@github-project-automation github-project-automation Bot moved this to Pending Review in Runtime Enforcer Mar 31, 2026

@dottorblaster dottorblaster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dottorblaster

Copy link
Copy Markdown
Member

I would like the upstream issue to be addressed but we can also do this meanwhile.

@holyspectral

Copy link
Copy Markdown
Collaborator Author

I found some issue in this PR. I'll change this to draft for now.

@holyspectral holyspectral marked this pull request as draft April 1, 2026 20:25
@dottorblaster dottorblaster moved this from Pending Review to Blocked in Runtime Enforcer Apr 2, 2026
@Andreagit97 Andreagit97 added this to the 0.6.0 milestone Apr 2, 2026
@dottorblaster dottorblaster moved this from Blocked to In Progress in Runtime Enforcer Apr 2, 2026
Signed-off-by: Sam Wang (holyspectral) <sam.wang@suse.com>
@holyspectral holyspectral force-pushed the enable-release-pre-release-charts branch from aa29b4b to 0b0fc11 Compare April 2, 2026 17:42
@holyspectral holyspectral marked this pull request as ready for review April 2, 2026 17:42
@holyspectral

Copy link
Copy Markdown
Collaborator Author

Thanks for your patience. I've updated this PR to correctly bump chart versions for pre-release. Please take a look again.

@holyspectral holyspectral moved this from In Progress to Pending Review in Runtime Enforcer Apr 2, 2026
@holyspectral holyspectral changed the title chore: allow helm releaser to publish prerelease chore: bump prerelease versions for prerelease Apr 6, 2026
@holyspectral holyspectral force-pushed the enable-release-pre-release-charts branch from 0b0fc11 to 8f1f42f Compare April 6, 2026 13:40

@Andreagit97 Andreagit97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!
It seems the 2 files helm-chart-update-prerelease.yaml and helm-chart-update.yaml are nearly identical

diff --git a/updatecli/updatecli.release.d/helm-chart-update-prerelease.yaml b/updatecli/updatecli.release.d/helm-chart-update.yaml
index 8a96101..892840d 100644
--- a/updatecli/updatecli.release.d/helm-chart-update-prerelease.yaml
+++ b/updatecli/updatecli.release.d/helm-chart-update.yaml
@@ -1,4 +1,4 @@
-name: Update RuntimeEnforcer prerelease chart versions
+name: Update RuntimeEnforcer chart versions
 
 sources:
   chartVersion:
@@ -43,23 +43,23 @@ scms:
         footers: "Signed-off-by: RuntimeEnforcer bot <runtime-enforcer-bot@users.noreply.github.com>"
 
 conditions:
-  prerelease:
-    name: Check if the latest runtime-enforcer release is a pre-release.
+  release:
+    name: Check if the latest runtime-enforcer release is a official release
     disablesourceinput: true
     kind: shell
     spec:
-      command: 'echo {{ source `releaseVersion` }} | grep -E "v[0-9]+\.[0-9]+\.[0-9]+-([0-9A-Za-z-]+\.)*[0-9A-Za-z-]+"'
+      command: '! echo {{ source `releaseVersion` }} | grep -E "v[0-9]+\.[0-9]+\.[0-9]+-([0-9A-Za-z-]+\.)*[0-9A-Za-z-]+"'
 
 actions:
   default:
-    title: 'chore: helm chart {{ source "chartVersion" }}-prerelease-{{ source "releaseVersion" }} release'
+    title: 'chore: helm chart {{ source "chartVersion" }} release'
     kind: github/pullrequest
     scmid: default
     spec:
       automerge: false
       mergemethod: squash
       description: |
-        Automatic Helm chart {{ source "chartVersion" }}-prerelease-{{ source "releaseVersion" }} update.
+        Automatic Helm chart {{ source "chartVersion" }} update.
         This PR has been created by the automation used to automatically update the Helm charts when RuntimeEnforcer is released or helm chart content is updated.
         REMEMBER IF YOU WANT TO MERGE IN A SINGLE COMMIT CHANGES AND VERSION BUMP, YOU MUST SQUASH THE COMMIT BEFORE MERGING THIS PR!
       draft: false
@@ -71,11 +71,10 @@ targets:
     scmid: default
     name: update Helm chart version
     kind: yaml
-    disablesourceinput: true
+    sourceid: chartVersion
     spec:
       file: charts/runtime-enforcer/Chart.yaml
       key: $.version
-      value: '{{ source "chartVersion" }}-prerelease-{{ source "releaseVersion" }}'
   update_appversion:
     scmid: default
     name: update Helm chart appVersion

Do you think there is a way to have just one file?

@holyspectral

Copy link
Copy Markdown
Collaborator Author

After checking, while we may be able to dedup to some degree via a values.yaml, this can make it overly complicated than necessary. After discussed with team, I'll keep it as it is.

@holyspectral holyspectral merged commit 5f51785 into rancher-sandbox:main Apr 9, 2026
13 checks passed
@holyspectral holyspectral deleted the enable-release-pre-release-charts branch April 9, 2026 00:59
@github-project-automation github-project-automation Bot moved this from Pending Review to Done in Runtime Enforcer Apr 9, 2026
@Andreagit97 Andreagit97 linked an issue Apr 9, 2026 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

ci: fix updatecli workflow for prereleases

5 participants