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

feat(helm-values): Support for bumpVersion #8240

Merged

Conversation

chgl
Copy link
Contributor

@chgl chgl commented Jan 10, 2021

Changes:

Implements the bumpPackageVersion interface for the helm-values manager. Because helm-values' packageFile is different from the file containing the version to be bumped (the Chart.yaml) this required adding support for decoupling the two. For now, only one additional bumpVersionPackageFile is supported, if the need arises it would probably be cleanest to provide a list of files that will need to be updated should the version be bumped.

I've tested it in the repo here: https://github.com/chgl/renovate-helm-values-bumpversion-test/pull/5/files and it seems to work.

Context:

Closes #8231

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • Unit tests + ran on a real repository

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Small types change

lib/manager/common.ts Outdated Show resolved Hide resolved
lib/manager/common.ts Outdated Show resolved Hide resolved
@rarkins
Copy link
Collaborator

rarkins commented Jan 11, 2021

A potential problem in future (not affecting this functionality I think) is that the Chart.yaml could have already been updated by Renovate and if we read it from disk in this bumpPackageVersion function then we'll get the pre-updated version and not the updated one. But that's a bigger problem to solve.

rarkins
rarkins previously approved these changes Jan 11, 2021
@chgl
Copy link
Contributor Author

chgl commented Feb 27, 2021

A potential problem in future (not affecting this functionality I think) is that the Chart.yaml could have already been updated by Renovate and if we read it from disk in this bumpPackageVersion function then we'll get the pre-updated version and not the updated one. But that's a bigger problem to solve.

Agreed! In this case, the helmv3 manager is able to bump the version of Chart.yaml as well, however since bumpVersion is a global setting, both this and the helmv3 manager would try to bump the version to the same value, overriding each other but still arriving at the same version.

Is there anything else I could improve or address for this PR?

@rarkins rarkins merged commit 662a60a into renovatebot:master Feb 28, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.67.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for bumpVersion when updating helm-values
4 participants