Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Conversation

@caguilar187
Copy link

Adds support for triggering multibranch pipeline jobs, in particular for global hooks. This relies on the scan functionality of the multibranch jobs, once it detects the SCM Uri.

Currently in def matches?(details, branch = false, exactly = false) I always return true, for a multibranch job since the uri has already been found. I know it would pass the matches_branch? but I don't see the point of traversing all the branches. In theory I think I should make setup_scms only grab the first branch it finds as well since that's all we need to get a SCM repo Uri.

This request only covers branches and not merge request. I'm looking into that next, but this seem self contained enough and worth adding to the main project. Also maybe you noticed something I missed as I continue down this path.

General note, these multibranch jobs extend from hudson.model.AbstractItem -> com.cloudbees.hudson.plugins.folder.AbstractFolder so that's why I made some decisions that I did since I couldn't use AbstractProject. I also decided to be more specific for the same reason's as I don't know how all AbstractFolder behave.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant