Apparently I've mixed up the meaning of the whitelist parameter in the configuration of a pluggable SCM and in the configuration of a material in a pipeline. In the former case it is a branch filter. In the latter case it is a file filter and is a completely different thing. So after I've created a separate fixed pluggable SCM for the "build-me" branch and attached it to a pipeline this pipeline is correctly picking up commits only to this branch as I need. суббота, 14 января 2023 г. в 22:19:01 UTC+7, Alexey Savchkov:
> I've tried to use the branch filter of the feature branch plugin > <https://github.com/ashwanthkumar/gocd-build-github-pull-requests> and it > doesn't seem to work correctly. Also there are a few similar open issues on > GitHub so I thought I'd rather ask via the mail group. > > I (for simplicity) have two branches: "build-me" and "other". I try to > specify a filter to trigger a pipeline only from commits to build-me. > > I have set up the following pluggable SCM for GitLab: > Name: gitlab-fb > Plugin Id: git.fb > url: g...@git.mycompany.com:myproject/repo.git > username: (Not specified) > password: (Not specified) > defaultBranch: main > branchwhitelist: (Not specified) > branchblacklist: (Not specified) > > I have also created two pipelines for comparison. Pipeline "build-all" > specifies the SCM obove without any modifications. In the "build-branch" > pipeline branch filter properties are added to the SCM. > > When I set the following filter in build-branch (in the Groovy > configuration syntax) > pluggable('gitlab-fb') { > scm = 'whatever-hash-123' > whitelist = ['build-me'] > } > then I observe the following bahaviour: > Commit to build-me - only build-all is triggered > Commit to other - only build-all is triggered > that is the build-branch pipeline is not triggered even if there are > commits to its whitelisted branch. > > When I set the following filter in build-branch just to have a non-empty > blacklist: > whitelist = ['build-me'] > blacklist = ['non-existing-branch'] > then I observe the following bahaviour: > Commit to build-me - both build-all and build-branch are triggered > Commit to other - both build-all and build-branch are triggered > that is the build-branch pipeline is triggered even if there are commits > to a branch not in its whitelist. > > Looks like there are multiple issues with branch filtering currently. Can > we get them fixed? > > Thanks a lot. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/d73018fb-8aad-42b1-ad56-fc4c49cabeeen%40googlegroups.com.