chartmuseum/helm-push

[feature request] helm push a chart from a github repository

nnt1054 opened this issue · 2 comments

Similar to how you can call docker build on a github url, it'd be useful if we could do the same with helm-push.
The purpose of this feature is to allow a more robust way of pushing new helm chart versions to a repository by allowing the helm chart to go through some sort of version control and be reviewed/merged before being uploaded to a helm chart repository.

An example command would be something like

$ helm push https://github.com/nnt1054/cicd_test.git chartmuseum --branch development --chart-path /testchart
Pushing testchart-0.1.2.tgz to mmo...
Done.

where you could also specify the branch and the path to the helm chart in the github repo.

I have a working example for this feature already on my fork: https://github.com/nnt1054/helm-push if this feature sounds like something helm-push could benefit from.

This seems to be an odd feature to me, and not in the context of Helm in particular, but the way software packaging is done in general.

I think the "usual" flow is to go through some sort of build pipeline that validates and tests the source and generates an artifact, which can be a helm chart, a binary, deb package, etc. That artifact is then pushed to an artifact repository, in this case, chartmuseum.

Helm push is a really simple tool with a single purpose which is nice. If you need additional features, I would suggest building tools on top of it. What you are asking sounds like a git clone && helm package && helm push which could even run as a script without cluttering the tool itself with a (in my opinion) weird feature.

No worries, this was more of a feature suggestion than a request, since I had already made working changes for this on a fork of helm-push for my own use, and the necessary changes were relatively clean and simple.

In regards to "usual flow", I'm basically replicating this simple Helm CI pipeline from this image from this medium post, where build and validation occur after pushing commits to github. The helm-push [url] feature would then allow for manual inspection of the build result before pushing the new package to chartmuseum. I also have additional pipelines that trigger once changes to the chartmuseum repo have been detected and deploys the new helm chart.

You're completely correct though that this could always just be run as a script. My goal was just to hand off a single robust command to the developers and tell them "after you merge your PR, this will start the pipeline and deploy your helm chart changes to the relevant cluster". Feel free to close this thread and have a nice day!