Page MenuHomePhabricator

publish jobs should support branch filtering for postmerge and still be triggerable via publish
Closed, ResolvedPublic

Description

The documentation jobs have a per branch filter since we usually only care about the master branch. They are triggered via the postmerge pipeline which reacts to Gerrit change-merged events. It carries the branch and it works fine.

I would like to reuse the exact same job when a tag is published. That is done via the publish pipeline which reacts to Gerrit ref-updated events matching ^refs/tags/.*$. In such a case, the branch: filter applied to the job will end up discarding the event, we thus need to additionally allow tags for all publish jobs.

Looking at Zuul source code https://review.openstack.org/14096 ) the branch filter attempt to match the event branch and fallback to the ref. It lacked documentation so I proposed a doc amendement to upstream: https://review.openstack.org/#/c/137130/

We thus need to apply to all publish jobs:

branch: ^(master|refs/tags/.*)$

Might want to add a wildcard for REL* branches later on.

Event Timeline

hashar claimed this task.
hashar raised the priority of this task from to High.
hashar updated the task description. (Show Details)
hashar changed Security from none to None.
hashar added subscribers: Unknown Object (MLST), Ltrlg, greg and 2 others.

We need to migrate all the other jobs to the publish-docs macro, then we can adjust their Zuul branch: filter.

This has been done for mediawiki-core-doxygen-publish and unicodejs-publish.

Most other projects either don't use release tags, or they do but also want branches (and thus don't have a filter). So this is resolved.

Other blocking issues to make this work properly are tracked under T73062.