Configure automated release jobs#

Use this guide to configure a project so that a pushed Git tag produces release notes and a GitLab Release.

Include the release support#

Add Pipeline Machinery as the .make submodule, then include the release makefile in your project Makefile:

-include .make/release.mk

Include the release CI template in .gitlab-ci.yml:

include:
  - project: ska-telescope/templates-repository
    file: gitlab-ci/includes/release.gitlab-ci.yml

Use the latest Pipeline Machinery release template and keep the .make submodule current.

Initialise release metadata#

Run the following command from the project root to create .release when it does not exist:

make .release

The file records the release version and tag prefix:

release=1.3.1
tag=1.3.1

For a repository that keeps separate release metadata for a component or image, see release-context-dir.

Create REL tickets from the tag pipeline#

Configure this optional integration only when the project needs its tag pipeline to create REL tickets. Projects that enable the create-rel-ticket job run make generate-rel-ticket during the tag pipeline. The job uses the calculated release version and project name when it creates the REL ticket.

To enable this job, add the REL ticket type and Jira component name to .release:

type=sub-system
component=<REL Jira component name>

Set type to component, system, or sub-system. Set component to a component name configured in the Release Management Jira project. The release product defaults to the GitLab project name; set RELEASE_PRODUCT=<product-name> in the project configuration when it must use a different product name.

Add project-specific version updates#

Pipeline Machinery provides pre- and post-release hooks for the common release operation and for Python, Helm, Conan, JavaScript, and documentation updates. Define the appropriate hook targets in your project Makefile when an additional generated file must change with the release version.

Keep hook implementations deterministic and review their output with the normal version changes. Do not use hooks to publish artefacts or create tags; the tag pipeline remains responsible for publication.

Configure changelog generation#

The tag pipeline calls make generate-changelog to create release notes and publish them to GitLab. By default, it uses:

  • CHANGELOG.md for the changelog;

  • .chglog/config.yml for git-chglog configuration;

  • .chglog/CHANGELOG.tpl.md for the release-note template.

Set CHANGELOG_FILE, CHANGELOG_CONFIG, or CHANGELOG_TEMPLATE in your project configuration when you need different paths. When the project-level configuration or template does not exist, Pipeline Machinery falls back to .make/.chglog/config.yml and .make/.chglog/CHANGELOG.tpl.md. Use make generate-release-notes to regenerate notes without publishing a GitLab Release.

The publishing target runs in a GitLab tag pipeline. It relies on the GitLab CI variables CI_COMMIT_TAG, CI_JOB_TOKEN, CI_PROJECT_ID, CI_PROJECT_URL, and CI_SERVER_URL. Do not run the publishing workflow locally with production credentials.

Add author notes#

Add an Author Notes heading beneath a release heading in CHANGELOG.md. Pipeline Machinery preserves this section when it regenerates the release notes.

Check the release pipeline#

After pushing a tag, check the tag pipeline. Confirm that configured artefacts publish successfully, the GitLab Release contains the generated notes and assets, and the REL ticket has the expected release links.

Get help with release integration#

Use the System Team Service Desk for Pipeline Machinery integration issues. Use #team-system-support for short questions.

Was this page helpful?