Issues with branchwhitelist / branchblacklist of a pluggable SCM

12 views
Skip to first unread message

Alexey Savchkov

unread,
Jan 14, 2023, 10:19:01 AM1/14/23
to go-cd
I've tried to use the branch filter of the feature branch plugin 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.

Alexey Savchkov

unread,
Mar 11, 2023, 8:32:58 AM3/11/23
to go-cd
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:
Reply all
Reply to author
Forward
0 new messages