Closed Piwero closed 3 months ago
This is a general limitation of semantic release, it is by default designed to just maintain one version (one chart in your case). There are solutions for this, e.g. https://github.com/pmowrer/semantic-release-monorepo. I haven't used this myself and can't guarantee it works with this plugin but might be worth to give it a try.
I have used this plugin in previously in a repo with multiple charts, this is how the gitlab ci config looked like
.release-helm:
extends: [.release] # <-- this was a custom semantic-release job (default should work for you)
variables:
PACKAGE_MANAGER: "helm"
HELM_CHART_REPO: "oci://your-domain.com/project"
release-chart1:
extends: [.release-helm]
variables:
PACKAGE_NAME: "chart2"
RELEASE_CONTEXT: "./charts/chart1" # <-- this was to run the job in the subdirectory
release-chart2:
extends: [.release-helm]
variables:
PACKAGE_NAME: "chart2"
RELEASE_CONTEXT: "./charts/chart2"
Essentially, you would have a job per chart which is executed inside the subdirectory. I would recommend to first try using public plugins like the monorepo one before implementing a custom solution like I did previously.
This is a general limitation of semantic release, it is by default designed to just maintain one version (one chart in your case). There are solutions for this, e.g. https://github.com/pmowrer/semantic-release-monorepo. I haven't used this myself and can't guarantee it works with this plugin but might be worth to give it a try.
I have used this plugin in previously in a repo with multiple charts, this is how the gitlab ci config looked like
.release-helm: extends: [.release] # <-- this was a custom semantic-release job (default should work for you) variables: PACKAGE_MANAGER: "helm" HELM_CHART_REPO: "oci://your-domain.com/project" release-chart1: extends: [.release-helm] variables: PACKAGE_NAME: "chart2" RELEASE_CONTEXT: "./charts/chart1" # <-- this was to run the job in the subdirectory release-chart2: extends: [.release-helm] variables: PACKAGE_NAME: "chart2" RELEASE_CONTEXT: "./charts/chart2"
Essentially, you would have a job per chart which is executed inside the subdirectory. I would recommend to first try using public plugins like the monorepo one before implementing a custom solution like I did previously.
Great, @nflaig . Thanks for the info, I'll try with those approaches.
Is there any way of the plugin to check in the multiple charts in the same repo? on this repo https://github.com/Piwero/helmseum, I have multiple charts inside the
charts/
directory but when addingIt fails with :
It's trying to look for file Chart.yaml which lives in each subdirectory of charts.
Please, find gh action with above setup error https://github.com/Piwero/helmseum/actions/runs/9329440411/job/25681881096