【发布时间】:2019-12-12 11:58:24
【问题描述】:
作业似乎没有被 GIT 提交触发,Pollscm 会在下面的“Pull src”阶段选择 repo 吗?或者请让我知道如何将 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'){
}
}
【问题讨论】:
标签: git jenkins jenkins-pipeline jenkins-plugins devops