
Jenkins 2.155,
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 (I suppose that in this case is correct)
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
}
}
}
}
using a reference repo checkout does not compute changes (I suppose that in this case is correct)
pipeline {
agent { label 'master'}
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}"]]])
}
}
}
}
using ChangelogToBranch checkout does not compute changes, here it should compute the changes with the reference branch
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: "origin",
compareTarget: "master"]]],
submoduleCfg: [],
userRemoteConfigs: [
[credentialsId: 'UserAndToken',
url: "${env?.GIT_URL}"]]])
}
}
}
}--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1e562716-319e-4b7e-82d6-eb355455b391%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Ew-7R2rToDQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtE%2BT0UaTWJfFTRF_ut89vx-egbjJiOrx8HbEWP9vdAHRg%40mail.gmail.com.