Skip to content
Snippets Groups Projects

.gitlab-ci.yml: Switch to rules for determining when to run a pipeline and limit dist run to tags

Merged ave requested to merge ci-improvements into main
1 unresolved thread

https://docs.gitlab.com/ee/ci/jobs/job_control.html

We're currently using only which is deprecated:

image

This:

  • moves us to rules from only
  • makes the dist pipeline only run for tags, as we don't want it to run twice (<which breaks the api repo somehow) when we create a release branch and a tag simultaneously. we also don't want to modify a release post-release without bumping the release number (v1.3.1 vs v1.3.0) as otherwise we sacrifice user (updates) and dev (people who git switch v1.3.0) friendliness.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • ave changed title from .gitlab-ci.yml: Switch to rules for determining when to run a pipeline to .gitlab-ci.yml: Switch to rules for determining when to run a pipeline and limit dist run to tags

    changed title from .gitlab-ci.yml: Switch to rules for determining when to run a pipeline to .gitlab-ci.yml: Switch to rules for determining when to run a pipeline and limit dist run to tags

  • ave added 2 commits

    added 2 commits

    • 9b19c434 - 1 commit from branch main
    • aa4b98c0 - .gitlab-ci.yml: Switch to rules/if

    Compare with previous version

  • moon2
    moon2 @moon2 started a thread on the diff
74 74 variables:
75 75 # Force a full clone to make version machinery work.
76 76 GIT_STRATEGY: clone
77 only:
78 - /^v\/[0-9]+\.[0-9]+\.[0-9]+.*$/
79 - /^release\/[0-9]+\.[0-9]+\.[0-9]+$/
80 - tags
77 rules:
78 - if: $CI_COMMIT_TAG
  • this looks wildly simpler than the regex (?) it replaces, how come?

  • Author Maintainer

    We don't want to trigger this on release branches, only tags.

    makes the dist pipeline only run for tags, as we don't want it to run twice (<which breaks the api repo somehow) when we create a release branch and a tag simultaneously. we also don't want to modify a release post-release without bumping the release number (v1.3.1 vs v1.3.0) as otherwise we sacrifice user (updates) and dev (people who git switch v1.3.0) friendliness.

    The only->rules change is due to only being deprecated.

  • Please register or sign in to reply
  • moon2 added 17 commits

    added 17 commits

    Compare with previous version

  • moon2 enabled an automatic merge when the pipeline for dc6c121b succeeds

    enabled an automatic merge when the pipeline for dc6c121b succeeds

  • merged

  • Please register or sign in to reply
    Loading