bitbucket-pullrequest-builder-plugin
bitbucket-pullrequest-builder-plugin copied to clipboard
Using Jenkins UI Replay button fails
When trying to rerun a build by clicking the "Replay" button on the Jenkins UI, it fails. The variables aren't defined in the replayed build (as you can see by the null values):
git config remote.origin.url ssh://git@<bitbucket.url>:7999/null/null.git
This occurs when running a pipeline job with the trigger configured through the UI, the pipeline is SCM'ed, and the checkout is defined inside the pipeline itself as follows:
checkout([
$class: 'GitSCM',
branches: [[name: "*/${env.sourceBranch}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'PreBuildMerge'],
options: [mergeRemote: 'origin', mergeTarget: "${env.targetBranch}"]
],
submoduleCfg: [],
userRemoteConfigs: [[
credentialsId: 'place-cred-id-here',
refspec: '+refs/pull-requests/*: refs/remotes/origin/pr/*',
url: "ssh://git@<bitbucket.url>:7999/${env.destinationRepositoryOwner}/${env.destinationRepositoryName}.git"
]]
])
I agree. Both the Build Now and Replay functions have never worked.
I'm changing this into an enhancement, and hoping someone wants to work on it!
following