Commit Graph

1 Commits

Author SHA1 Message Date
James E. Blair 4f93d6d527 Don't add implied branch matchers to project-pipeline variants
The project pipelines themselves have branch matchers now, so we should
not add implied branch matchers to project-pipeline job variants.  This
error would cause centrally defined tag/release jobs not to run when added
to in-repo project-pipeline definitions in multi-branch repos because
these project-pipeline variants would end up with branch matchers.

There remains a similar case where if a job is defined in a multi-branch
repo with no explicit branch matchers and added to a tag/release pipeline,
it will not run because the job definition itself will not match the tag.
Currently the only solution to this is to add an explicit branch matcher
to one or more of the top-level job definitions.  A more intuitive solution
is difficult because in the case of multiple variants, it's not clear which
should apply.

Removing the implied branch matchers from project-pipeline jobs also removes
them from project-template jobs.  We previously added branch matchers to
project configs, but did not do the same for project-templates.  This change
requires that we do so.  Now all projects and project-templates are given
implied branch matchers if appropriate, and these are used to determine if
their jobs are added.  This is a further behavior change in that a project
which invokes a template defined in another project which is branched will
(absent the disabling of implicit branch matchers) no longer use that template
on branches other than the one where it is defined.

Change-Id: I55cec1897b0d64fa61d43ef5dbeb8a3c37bf7862
2018-06-27 10:43:56 -07:00