如何防止Jenkins SCM轮询触发分支创建的构建

B W*_*B W 5 git jenkins jenkins-pipeline

我在Jenkins服务器作业中设置了git SCM轮询。我在本地计算机上运行以下命令,它们触发了Jenkins构建:

git checkout dev
git pull origin dev
git branch feature/new-feature
git checkout feature/new-feature
git push origin dev:feature/new-feature
Run Code Online (Sandbox Code Playgroud)

当唯一改变的是分支创建(没有新提交)时,有什么方法可以防止Jenkins SCM轮询触发构建?

小智 0

您应该在 Jenkins 项目中配置“跳过第一个分支索引上的初始构建”选项。对于多分支项目,此选项可以在“构建策略”部分后面找到。