Skip to content

refactor(ci): extract helm functions to lib/helm.sh#4118

Merged
openshift-merge-bot[bot] merged 3 commits intoredhat-developer:mainfrom
gustavolira:RHIDP-11009
Jan 30, 2026
Merged

refactor(ci): extract helm functions to lib/helm.sh#4118
openshift-merge-bot[bot] merged 3 commits intoredhat-developer:mainfrom
gustavolira:RHIDP-11009

Conversation

@gustavolira
Copy link
Copy Markdown
Member

Summary

Extract Helm chart operations and value file manipulation functions from utils.sh into a dedicated lib/helm.sh module as part of the CI refactoring effort.

Changes

  • Created lib/helm.sh with 6 extracted functions:
    • helm::merge_values (from yq_merge_value_files)
    • helm::uninstall (from uninstall_helmchart)
    • helm::get_image_params (from get_image_helm_set_params)
    • helm::install (from perform_helm_install)
    • helm::get_chart_version (from get_chart_version)
    • helm::get_previous_release_values (from get_previous_release_value_file)
  • Updated utils.sh to import the new module
  • Removed duplicate function implementations from utils.sh
  • Updated lib/README.md with module documentation

Backward Compatibility

Alias functions are provided in lib/helm.sh to maintain backward compatibility with existing call sites.

Test plan

  • Verify shellcheck passes on lib/helm.sh
  • Run CI jobs (ocp-operator, eks-operator) to verify helm operations work correctly
  • Verify helm install/upgrade operations complete successfully

Jira: RHIDP-11009

🤖 Generated with Claude Code

Extract Helm chart operations and value file manipulation functions
from utils.sh into a dedicated lib/helm.sh module.

Functions extracted:
- yq_merge_value_files -> helm::merge_values
- uninstall_helmchart -> helm::uninstall
- get_image_helm_set_params -> helm::get_image_params
- perform_helm_install -> helm::install
- get_chart_version -> helm::get_chart_version
- get_previous_release_value_file -> helm::get_previous_release_values

Backward compatibility is maintained through alias functions
that delegate to the new namespaced functions.

Jira: RHIDP-11009

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot requested review from albarbaro and psrna January 29, 2026 22:09
gustavolira and others added 2 commits January 29, 2026 19:12
Add explicit return statements to satisfy SonarCloud code quality checks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@gustavolira
Copy link
Copy Markdown
Member Author

/test ?

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm-nightly

@github-actions
Copy link
Copy Markdown
Contributor

@albarbaro
Copy link
Copy Markdown
Member

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: albarbaro

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 9941e8e into redhat-developer:main Jan 30, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants