[NOTICKET] ci: refactor ci to create a release on harbor on new repo tags
This MR adds the capability to the CI to upload the charts to CERN helm registry (Harbor).
For that I have added a new step named helm_deploy
that when a tag is made within the repo:
- fist, checks if the tag name exists in harbor; and,
- second, upload the chart to harbor tagged with the same name as the tag in the repo.
Once uploaded the helm chart can be downloaded for example as follows:
helm pull oci://registry.cern.ch/monit/cern-it-kubernetes-monitoring --version 0.2.0
Merge request reports
Activity
added 1 commit
- 541775f6 - [NOTICKET] ci: add build and deploy steps to upload the monitoring chart to registry.cern.ch
Hi @bgarrido, indeed after our quick chat makes much more sense to have the ci configured to deploy to harbor based on tags. For that I have made the following changes:
- On MR to master: heavy tests are done.
- On tag: the CI checks that the tag does not exist on Harbor, packages and pushes the chart new version.
As we discussed harbor uses the version that is found inside the
Chart.yaml
file. To avoid having to change this every time we need a new release I have created an step before the packaging of the chart where the CI (locally) updates theChart.yaml
version
value with the tag title value.For the moment the CI is quite simple. On tag, only check if tag exists and if not package and push. But maybe it could be updated to include two package push manual steps, one for release candidate (ex.
0.2.0-rc
) and another one for the final one (ex.0.2.0
). In my opinion I do prefer the current approach but as you see best .