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.
Each commit in main will trigger the workflow to create a new release via semantic-release. 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.
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
- Create stable branch from main
- Protect
main,stableand 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 |
| --- | --- | --- | --- |
| configuration-enabled | Whether to run the configuration job. Set to false if the downstream pipeline already has the necessary configuration and secrets set up. | 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 |