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

🐛 Fix build and publish nightly Helm chart workflow #748

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

furkatgofurov7
Copy link
Contributor

@furkatgofurov7 furkatgofurov7 commented Sep 18, 2024

What this PR does / why we need it:
Fix Build and Publish nightly Helm chart and Docker images GHA

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:
There are couple of issues with how we currently construct RELEASE_TAG, PREVIOUS_TAG and HELM_CHART_TAG env vars in Makefile.

  1. As is without this change, when you run make release-chart, chart is built and values.yaml looks like below(truncated version):
rancherTurtles:
  image: ghcr.io/rancher/turtles
  imageVersion: test/v0.11.0
  imagePullPolicy: IfNotPresent
  namespace: rancher-turtles-system
  managerArguments: []
  imagePullSecrets: []
  rancherInstalled: true

imageVersion is set to tag with test/ and that is because build-chart replaces imageVersion with CONTROLLER_IMAGE_VERSION:

CONTROLLER_IMAGE_VERSION ?= $(shell git describe --abbrev=0 2>/dev/null) 

which sets the CONTROLLER_IMAGE_VERSION variable to the most recent tag in the Git repository. That is problematic because we might have a test/ tag which is recent (test/v0.11.0 was the case in above example).

After the change, values.yaml looks like below:

rancherTurtles:
  image: ghcr.io/rancher/turtles
  imageVersion: v0.11.0
  imagePullPolicy: IfNotPresent
  namespace: rancher-turtles-system
  managerArguments: []
  imagePullSecrets: []
  rancherInstalled: true

  1. HELM_CHART_TAG was changed as part of 94af096 that caused Build and Publish nightly Helm chart and Docker images GHA fail. What happens is that, we pass both RELEASE_TAG/CONTROLLER_IMAGE_VERSION:
make release-chart RELEASE_TAG=v0.0.0-638758228788e03224397f4bb85e9830ae125dcc CONTROLLER_IMAGE_VERSION=v0.0.0-638758228788e03224397f4bb85e9830ae125dcc

from workflow, however chart is packaged without sha256 without this change:

Successfully packaged chart and saved it to: out/package/rancher-turtles-v0.0.0.tgz

That is again an issue, since chart publishing expects to have the sha256 as part of the packaged chart.

Reverting back makes it work again as before and it includes sha256 when testing locally.

Checklist:

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

Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
@furkatgofurov7 furkatgofurov7 requested a review from a team as a code owner September 18, 2024 13:37
@furkatgofurov7 furkatgofurov7 added the kind/bug Something isn't working label Sep 18, 2024
@furkatgofurov7 furkatgofurov7 self-assigned this Sep 18, 2024
@furkatgofurov7 furkatgofurov7 enabled auto-merge (squash) September 18, 2024 14:56
@furkatgofurov7 furkatgofurov7 merged commit 41bdb50 into rancher:main Sep 18, 2024
36 of 39 checks passed
@furkatgofurov7 furkatgofurov7 deleted the fix-chart-pkg branch September 18, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants