bitbucket-push-and-pull-request-plugin icon indicating copy to clipboard operation
bitbucket-push-and-pull-request-plugin copied to clipboard

Unable to get plugin working on multibranch pipelines and Bitbucket server

Open curtisgcarroll opened this issue 3 years ago • 1 comments

Versions: Jenkins - 2.289.1 Bitbucket Server - 7.17.4 Bitbucket PPR Plugin - 2.7.2 Pipeline Multibranch - 2.24

I have a job setup using a .pipelinejob file as below. Triggers do not seem to make it down to the children jobs that are spawned when branches are created in this test repo. When I push to the remote, the logs show jobs being checked for matching triggers but when the multibranch pipeline is checked I just receive "Bitbucket Trigger for job: CURTIS » MULTI » test is not present."

Are there examples of multibranch pipelines to look at? Is there additional configuration that may have been missed in the readme? I could not see any specific callouts in the documentation, but I did see the note that BB server support for multibranch was added in 2.6.1

import jenkins.model.Jenkins

multibranchPipelineJob("/CURTIS/MULTI") {
    def repo = 'testsite/curtis.git'

     branchSources{
        git {
            id('curtistesting')
            remote('testsite/curtis.git')
            credentialsId('bitbucket')
            includes('*')
        }
    }

    triggers {
        bitBucketTrigger{
            triggers{
                bitBucketPPRRepositoryTriggerFilter {
                    actionFilter{
                        bitBucketPPRServerRepositoryPushActionFilter {
                            triggerAlsoIfTagPush(false)
                            triggerAlsoIfNothingChanged(true)
                            allowedBranches("*")
                        }
                    }
                }
            }
        }
    }

    description("Pipeline for $repo")

    factory{
        workflowBranchProjectFactory {
            scriptPath('scripts/pipelines/MultiPR/multiPR.jenkinsfile')
        }
    }
}

curtisgcarroll avatar Feb 16 '22 02:02 curtisgcarroll

Facing same issue with a typical Jenkinsfile. Seem's that properties defined on file are not taken into consideration. The same configs but set on the UI are applied and everything works

JoaoPPCastelo avatar Aug 30 '22 07:08 JoaoPPCastelo