我正在尝试为groovy管道设置GIT轮询。脚本,而不是声明
git branch: '${Branch}',
credentialsId: 'some.key.ssh',
poll: true,
url: "ssh://[email protected]/project-${env.Project}.git"
Git Branch由参数设置: Poll SCM设置为:* * * * *
我看到轮询工作 - 但它无法获得任何东西 - 它不会触发构建
所以问题是 - 有没有办法解决这个问题?请不要建议webhooks - 我不能使用它。只有民意调查SCM
在Jenkinsfile中你可以像这样使用cron:
pipeline {
agent { label "master" }
triggers {
cron('* * * * *')
}
.
.
.
}