We are seeing this issue in our PRs on the creation event any of the PRs has changes, we tried the following pipelines and none works, we used a Shared pipeline library configured globaly (I dunno if it matters), we use Jenkins 2.153,
Pipeline 2.2, Declarative pipeline 1.33, Pipeline: Multibranch 2.20,
Pipeline: SCM Step 2.7, SCM API Plugin 2.3.0, Github API 1.95, Basic Branch Build Strategies Plugin 1.1.1, Branch API Plugin 2.1.1,
GitHub Branch Source Plugin 2.4.1
regular checkout does not compute changes
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
stages {
stage('Dummy'){
steps {
sh 'export'
checkout scm
error "Please do not continue"
}
}
}
}
using a reference repo checkout does not compute changes
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
stages {
stage('Dummy'){
steps {
checkout([$class: 'GitSCM',
branches: [[name: "${env?.CHANGE_ID ? env?.GIT_COMMIT : env?.BRANCH_NAME}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CloneOption',
noTags: false,
reference: '/var/lib/jenkins/.git-references/apm-agent-go.git',
shallow: false]],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'UserAndToken',
url: "${env?.GIT_URL}"]]])
error "Please do not continue"
}
}
}
}
using ChangelogToBranch checkout does not compute changes
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
timestamps()
ansiColor('xterm')
disableResume()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
stages {
stage('Dummy'){
steps {
checkout([$class: 'GitSCM',
branches: [[name: "${env?.CHANGE_ID ? env?.GIT_COMMIT : env?.BRANCH_NAME}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'ChangelogToBranch',
options: [compareRemote: "${env?.GIT_URL}",
compareTarget: "${env?.CHANGE_ID ? env?.CHANGE_TARGET : 'master'}"]]],
submoduleCfg: [],
userRemoteConfigs: [
[credentialsId: 'UserAndToken',
url: "${env?.GIT_URL}"]]])
error "Please do not continue"
}
}
}
}
OK, so one of the classes in workflow-multibranch-plugin needs to inherit from SCMFileSystem? Is that correct?