Fix the Release job failing on the container-image asset link

What is the bug

The Release job fails on every version tag. On 2.1.0 (job 2213888):

failed to create release: API Error Response status_code: 400
message: Validation failed: Links url is blocked: Hostname or IP address invalid

The tag and the changelog are fine — Prepare Changelog succeeds and the tag is created — but no release object is produced, so the release simply never appears.

How do you fix it

The job declared one asset link:

    assets:
      links:
        - name: 'Container Image $CI_COMMIT_TAG'
          url: "https://$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA"

Two independent problems with it:

  • This project has container_registry_enabled=false and the pipeline never builds or pushes an image, so the link pointed at something that does not exist.
  • $CI_REGISTRY_IMAGE is already a registry path (registry.gitlab.dkrz.de/icon-libraries/libiconmath), not a hostname. Wrapping it as https://: puts the commit SHA where a URL port belongs, which is what GitLab rejected.

The block is removed, with a comment recording why so it is not reinstated. Nothing else about the release changes: GitLab attaches the source archives (zip, tar.gz, tar.bz2, tar) by itself, so no download is lost.

How urgent is the bugfix

  • I need it as soon as possible
  • I can wait for a couple of days
  • None of my current codes is directly affected

Mandatory steps before review

  • Gitlab CI passes (Hint: use make format for linting)
  • Bugfix is covered by additional unit tests
  • Mark the merge request as ready by removing Draft:

Mandatory steps before merge

  • Reviewed by a maintainer
  • Incorporate review suggestions
  • Remember to edit the commit message and select the proper changelog category (feature/bugfix/other)

You are not supposed to merge this request by yourself, the maintainers of libiconmath take care of this action!

Edited by Pradipta Samanta

Merge request reports

Loading