Skip to content

feat: Depend on the `semantic_release` job when generating a Helm chart.

feat: Depend on the semantic_release job when generating a Helm chart.

This MR adds a dependency on the semantic_release job, so that by the time the Helm chart is being generated the Git tag for the release already exists.

The file uses !reference tags to ensure that deployments run under the same circumstances as the semantic_release job.

We also want to create a Helm chart during a merge request pipeline, but not upload it to the registry. Since we cannot conditionally add a needs: keyword for branch pipelines only, this creates two separate jobs that use the extends: keyword to minimize duplication.

FTR: I wanted to use an "input" to allow users to override the job that we depend on. I ran into issues with yamllint being unable to parse/validate the following syntax, so opted to unblock us with a hard-coded job name for now.

rules:
  - !reference [$[[ inputs.semantic_release_job ]], rules]

Example deployment: https://gitlab.com/gitlab-com/gl-infra/platform/runway/example-service/-/pipelines/1491761084

Issue: team#335 (closed)

Edited by Florian Forster

Merge request reports

Loading