Skip to content

Plugin does not work with MultiBranch Pipelines #241

Open
@jsj1027

Description

@jsj1027

Current trigger setup:
triggers{
bitbucketpr(cron: '* * * * ',
credentialsId: '
',
repositoryOwner: '',
repositoryName: '
**',
branchesFilter: '
/${sourceBranch}
branchesFilterBySCMIncludes: true,
ciKey: 'jenkins.pr',
ciName: 'jenkins.pr',
checkDestinationCommit: false,
approveIfSuccess: true,
buildChronologically: true,
cancelOutdatedJobs: true,
commentTrigger: 'test this now')
}
Current Behavior:

Currently if you setup the a Jenkinsfile for a MBP(MutliBranchPipeline) with this plugin you get very weird behavior.

Lets say you have branches A,B,C with open PRs.
But only branch A has the Jenkinsfile for the MBP. This triggers a build on the MBP in the branch A section for builds A B and C.
The descriptions of the builds will be whatever the PR name was for each branch respectively.

Then lets say you do a scan of the MBP, this will trigger builds for A,B,C in the branch A section, with the same outcome as above. This can be stopped by turning off index triggers.

Now lets say you make branch D, with a open PR, but this one also has the new Jenkinsfile for the MBP.
This triggers a build in the branch A section rather than the branch D section.

Now if you run a build manually in the branch D section of the MBP this triggers builds for A,B,C,D.

Expected Behavior:

Pull Request triggers only fire off builds for their respective branches in only their respective sections.
Branch D triggers only create builds in the branch D section.
Only branch A triggers create builds in the branch A section.

Branch indexing triggers, if turned on, only fire off builds for the branches that have the Jenkinsfile in their respective sections.
Builds would happen in the branch A, and D sections respectively, but only for branches A and D.

Screenshots and further clarification available upon request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions