I am trying to use
<branches>
<hudson.plugins.git.BranchSpec>
<name>refs/heads/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
in my config.xml
Which means I am intending to build only commits of master, but apparently jenkins seems to build from commits to any other branches too. I am not sure what I am doing wrong to accomplish this. Any help is appreciated.
PS: Using the jenkins Git plugin
You only need the branch name without the refs
<branches>
<hudson.plugins.git.BranchSpec>
<name>origin/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
Or for local branch:
<branches>
<hudson.plugins.git.BranchSpec>
<name>master</name>
</hudson.plugins.git.BranchSpec>
</branches>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.