Skip to content

Backend/Frontend: Allow publishing process only via `release-cli`

This issue introduces a breaking change to the publishing process of CI/CD components (Beta)

The breaking change is expected to occur if an old version (possibly pinned) of release-cli Docker image is used with the release keyword when publishing a new release. Make sure you always use release-cli:latest image to avoid the breaking change or at least a version greater than v0.17.0.

Problem

Users today can publish a release by using the release-cli as recommended option. However, despite a disclaimer in the Release UI discouraging users to publish components through it, users can still use the form to publish the release.

We will be changing how the release-cli works by moving the metadata processing and publishing to the client side. For this we need to ensure that all projects are publishing components via the release-cli only.

Solution

We need to open 3 MRs:

  1. Deactivate the Release UI if the project is marked as catalog resource.
  2. Declare an optional parameter catalog_publish: in the Release API. It currently accepts nil (default) or :legacy_server_side_publishing to run the current server-side logic.
    1. We need to ensure that this parameter is not documented because it's for internal use only, so that users don't depend on this and we can remove it in the future.
    2. This change will make the Release API not publish the release by default. Only the release-cli will send this parameter.
  3. Change the release-cli to send a parameter catalog_publish: :legacy_server_side_publishing to the Release API if the $CI_JOB_TOKEN is used. This ensures that publishing a release can only work from inside a CI job.
Edited by Mark Nuzzo