bitbucket-pullrequest-builder-plugin icon indicating copy to clipboard operation
bitbucket-pullrequest-builder-plugin copied to clipboard

Using Jenkins UI Replay button fails

Open ejrgilbert opened this issue 6 years ago • 2 comments

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"
    ]]
])

ejrgilbert avatar Aug 29 '19 14:08 ejrgilbert

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!

CodeMonk avatar Aug 29 '19 14:08 CodeMonk

following

HeidiRechek avatar Oct 15 '21 18:10 HeidiRechek