Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
CI_Source CI_Source
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Metrics
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Support
  • CI_SourceCI_Source
  • Merge requests
  • !11

Merged
Created Dec 17, 2021 by Ben Avison@bavisonDeveloper

Enable all jobs in detached pipelines

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

When working on an unrelated issue, it became clear that the reason why previously only the merge_log and merge_whitesp jobs appeared in detached pipelines (the ones that relate to an open MR) was really because they include a rules section. It is as though in the absence of a rules section, a default one applies, which adds the job to the pipeline only if that pipeline was due to an update of a branch or tag ref. When rules was present for a job, it overrides the default, and is evaluated irrespective of the the pipeline trigger.

Now, it's useful to have all the jobs present in detached pipelines. The latest detached pipeline state, and its associated artifactes, are displayed at the top of the "Overview" tab of each MR page, and a new one can be easily triggered from the "Run pipeline" button at the top of the MR page's "Pipelines" tab, without having to navigate to the contributor's fork project (which may not even be public). It's also a problem that the cleanup job wasn't being run for detached pipelines, since over time that risks filling up the disc space on the runner machine.

It turns out all of this can be implemented simply by adding a workflow section which defines a new default set of rules, which adds jobs to detached pipelines as well as ones for branches and tags.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: complete-detached-pipelines