-
Improvement
-
Resolution: Unresolved
-
Minor
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits.
Actually we must use this code to manually checkout.
checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ])
With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected.
See also https://issues.jenkins.io/browse/JENKINS-14138 & https://issues.jenkins.io/browse/JENKINS-24638
[JENKINS-68543] Support for ChangelogToBranch
Description |
Original:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([$class: 'GitSCM', branches: [[name: "FETCH_HEAD"]], extensions: [ [$class: 'LocalBranch'], [$class: 'CloneOption', noTags: true, shallow: true], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]], ], userRemoteConfigs: [[ refspec: "+refs/pull/${env.CHANGE_ID}/head:refs/remotes/origin/PR-${env.CHANGE_ID}", url: "https://<github-enterprise-url>/<org>/<repo>.git", credentialsId: 'github' ]] ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also |
New:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', branches: [[name: "FETCH_HEAD"]], doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], userRemoteConfigs: scm.userRemoteConfigs ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also |
Description |
Original:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', branches: [[name: "FETCH_HEAD"]], doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], userRemoteConfigs: scm.userRemoteConfigs ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also |
New:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also |
Description |
Original:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also |
New:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also https://issues.jenkins.io/browse/JENKINS-14138 |
Description |
Original:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also https://issues.jenkins.io/browse/JENKINS-14138 |
New:
We miss the ChangelogToBranchTrait.
It would be nice to have this trait, so that the currentBuild.rawBuild.changeSets variable is filled and the emailext plugin can find the developers from the commits. Actually we must use this code to manually checkout. {code:groovy} checkout([ $class: 'GitSCM', doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, userRemoteConfigs: scm.userRemoteConfigs // important changes branches: [[name: "FETCH_HEAD"]], extensions: scm.extensions + [[$class: 'LocalBranch'], [$class: 'ChangelogToBranch', options: [compareRemote: 'origin', compareTarget: env.CHANGE_TARGET]]], ]) {code} With this the currentBuild.rawBuild.changeSets variable is filled and all works as aspected. See also https://issues.jenkins.io/browse/JENKINS-14138 & https://issues.jenkins.io/browse/JENKINS-24638 |