i have a Jenkins multibranch Pipeline configured which should fetch sources from a remote GIT repository for a build. Jenkins no seems to "randomly" pick an old commit for the build an showing the message "Multiple candidate revisions" in Build log files.
My Pipeline is looking like:
checkout(
[
$class: 'GitSCM',
branches: [[name: "release/0.0.1"]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'MessageExclusion', excludedMessage: '(?s)^\\[DOC\\] Robot.*']
],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'xxx', url: "https://somerepo.net/scm/someproject/somecomponent.git"]]
]
)
Log file from Jenkins shows:
[Pipeline] checkout
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://somerepo.net/scm/someproject/somecomponent.git # timeout=10
Fetching upstream changes from https://somerepo.net/scm/someproject/somecomponent.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://somerepo.net/scm/someproject/somecomponent.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse release/0.0.1^{commit} # timeout=10
> git rev-parse refs/remotes/origin/release/0.0.1^{commit} # timeout=10
Multiple candidate revisions
Checking out Revision 301c954e576bd3f03ef787563f159d541cb6e8d2 (release/0.0.1)
> git config core.sparsecheckout # timeout=10
> git checkout -f 301c954e576bd3f03ef787563f159d541cb6e8d2
Commit message: "Some old commit message"
> git rev-list --no-walk 88be7349bd7b6ddb0654325e6b07cf1da2f8a35b # timeout=10
In the log file I can see that Jenkins is using the old revision 301c954e576bd3f03ef787563f159d541cb6e8d2 from release/0.0.1 instead of the new remote 88be7349bd7b6ddb0654325e6b07cf1da2f8a35b from refs/remotes/origin/release/0.0.1.
Any ideas whats going wrong here?