Pipeline components component
This pipeline handles the management of a components project. It will create unstable releases, stable releases and provide a stable branch bound to the latest stable version.
Configure GITLAB_TOKEN with a group service account before enabling release automation.
Each commit in main will trigger the workflow to create a new release via semantic-release. The configuration job creates the release branch from the default branch when it is missing and protects it for Maintainer pushes and merges without replacing existing protection settings. In the first tagged pipeline a new commit is created with pinned versions in the codebase and then tagged with that version merged to stable. Finally, that commit is reverted in main to unpin it from latest version. All pushes are done with ci.skip to avoid triggering a new pipeline.
Bugs
Variables
| Name | required | Hints |
|---|---|---|
| GITLAB_TOKEN | no | Non-personal access token of a service account fallback to CI_JOB_TOKEN with limitations |
Limitations of CI_JOB_TOKEN:
The current limitations of using CI_JOB_TOKEN are so severe that we recommend using GITLAB_TOKEN instead.
- You can't trigger the wiki publishing.
- Create pipeline not working, so you need to trigger the pipeline manually after pushing a commit to
mainor use a scheduled pipeline. - Cannot create comments on merge requests, so no release notes in merge requests.
Setup
- Create a new components catalog project
- The pipeline creates
stablefrom the default branch and protects it when automatic configuration is enabled. - Protect
mainand all tags*. - Create GitLab pipeline file
.gitlab-ci.yml:
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/pipeline-components@stable
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| autoconfigure-enabled | Enable or disable the automatic configuration of the pipeline. | true | boolean |
| documentation-path | Path to the documentation files | ./docs | string |
| name | The name of the project to release | ${CI_PROJECT_NAME} | string |
| needs | The jobs that this job depends on. | [] | array |
| release-branch | The branch to release from | stable | string |
| stage | The name of the stage | release | string |
| tags | The runners that this job depends on. | [] | array |