[英]Want to know how PollSCM pick the repo to poll in Jenkins Pipeline
作业似乎没有被 GIT 提交触发,Pollscm 会在下面的“Pull src”阶段选择回购吗? 或者请让我知道如何将 repo 传递给 PollSCM,以便在 git repo 提交更改后触发构建?
node( ) {
properties([
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '40')),
disableConcurrentBuilds(),
parameters([
string(defaultValue: '', description: '', name: 'BRANCH', trim: false),
]),
pipelineTriggers([pollSCM('H/10 * * * *')])
])
stage('Clean Workspace') {
cleanWs deleteDirs: true
}
stage('Pull src') {
git branch: env.BRANCH, credentialsId: 'git', url: 'git@github.com:something/something'
}
stage('Pack'){
}
}
PollSCM 自动选择“Pull src”阶段的回购,我的 GIT 凭据在更正后遇到问题,上述工作运行良好,按规定定期轮询并在提交时运行构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.