feat: verify charts publishing pipeline in charts/charts.gitlab.io

What does this MR do?

The release_package job triggers a downstream pipeline in charts/charts.gitlab.io to publish the Helm chart, but does so as fire-and-forget — it never checks whether the chart was actually published. This means a failed publish goes undetected until someone notices charts are missing, as discussed in gitlab-com/gl-infra/delivery#21908 (closed).

This MR adds a new script scripts/wait_for_charts_availability.sh that polls charts.gitlab.io using helm show chart until the chart version is available, and fails the release_package job if it never becomes available. This makes the dev.gitlab.org tag pipeline a reliable signal: if it passes, Helm charts are confirmed published from an end-user perspective.

This is consistent with the existing pattern in the same job — wait_for_images.sh already waits until CNG images are confirmed available before triggering the chart release. The fire-and-forget on the charts.gitlab.io trigger was the odd one out.

The release_package job has a 2h timeout. In practice the job completes in 30-40 minutes (mostly running wait_for_images.sh). The charts.gitlab.io pipeline itself takes only a few minutes, so there is significant headroom within the existing timeout for running the new script.


We have also removed code to release UNSTABLE version, as we checked the git tags in this repo and the last auto-deploy tag (13.3.202007301740+b6a916c340e) was from July 2020, almost 5 years ago and all releases since then have been semantically versioned.

Testing

Tested locally against an already-published chart version:

cd ~/Repos/gitlab

POLL_INTERVAL=5 bash scripts/wait_for_charts_availability.sh 9.10.1
Waiting for GitLab Helm chart version 9.10.1 to be available on https://charts.gitlab.io/
"gitlab" already exists with the same configuration, skipping
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "gitlab" chart repository
Update Complete. ⎈Happy Helming!⎈
GitLab Helm chart version 9.10.1 is available on https://charts.gitlab.io/

MAX_WAIT_SECONDS=15 POLL_INTERVAL=5 bash scripts/wait_for_charts_availability.sh 9.99.99
Waiting for GitLab Helm chart version 9.99.99 to be available on https://charts.gitlab.io/
"gitlab" already exists with the same configuration, skipping
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "gitlab" chart repository
Update Complete. ⎈Happy Helming!⎈
Chart version 9.99.99 not yet available (elapsed: 0s), retrying in 5s...
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "gitlab" chart repository
Update Complete. ⎈Happy Helming!⎈
Chart version 9.99.99 not yet available (elapsed: 10s), retrying in 5s...
Timed out after 15s waiting for GitLab Helm chart version 9.99.99 on https://charts.gitlab.io/

Closes gitlab-com/gl-infra/delivery#21908 (closed)

Author checklist

For general guidance, please follow our Contributing guide.

Required

For anything in this list which will not be completed, please provide a reason in the MR discussion.

  • Merge Request Title and Description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline.
  • Documentation created/updated.
  • Tests added/updated, and test plan for scenarios not covered by automated tests.
  • Equivalent MR/issue for omnibus-gitlab opened.

Reviewers checklist

Edited by Manjunath Bhadrannavar

Merge request reports

Loading