• Ben Avison's avatar
    Enable all jobs in detached pipelines · dc064d26
    Ben Avison authored
    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.
    dc064d26
refresh.awk 45.2 KB