Giter Site home page Giter Site logo

dozd / multi-branch-project-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/multi-branch-project-plugin

0.0 2.0 0.0 508 KB

Jenkins plugin providing a new project type for multiple branches

Home Page: https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin

Java 100.00%

multi-branch-project-plugin's Introduction

Jenkins Multi-Branch Project Plugin

This plugin adds an additional project type that creates sub-projects for each branch using a shared configuration.

Usage

Install the plugin using one of these methods:

  • Use the Jenkins plugin update center to download and install the latest version.
  • Clone this repo, manually compile the HPI file, and upload it through the Jenkins interface on the "advanced" tab in the plugin update center to get the newest/unreleased code.

The project type will appear in the list on the "New Job" page. When configuring the project, the SCM portion will be different. This section tells the project how to find branches to create sub-projects for. Just about everything else should look like a normal free-style project and will be applied to each sub-project.

Development Instructions

To build the plugin locally:

mvn clean verify

To release the plugin:

mvn release:prepare release:perform

To test in a local Jenkins instance:

mvn hpi:run

Credits

Thanks to Stephen Connolly for his work on the Jenkins Literate Plugin, Branch API Plugin, and SCM API Plugin. These plugins were great reference for creating this plugin's implementation. The SCM API is also what allows this plugin to use different SCM types for obtaining the branch list.

Why not use the Branch API Plugin?

This project was first started from scratch. After discovering the Branch API, the implementation was changed to utilize the API. However, there were some issues with API that caused the switch back to an independent plugin:

  • The vision for this plugin is one consolidated configuration for all branches combined with support for the same build wrappers, builders, publishers, etc. that you would see in the "stock" Jenkins project types. In order for this to be possible, the project class must extend AbstractProject (or its sub-type Project). In the API, its MultiBranchProject class extends AbstractItem. This prevents the use of all the wrappers/builders/publishers from not just out-of-box Jenkins, but also the community plugins, which is what makes Jenkins great.
  • The API is still experimental (it has its fair share of TODOs in the source). This plugin aims to be suitable for a production environment as soon as possible, without dependencies on the progress of the API's development.
  • This plugin favors simplicity in configuration over the complexity seen in the API. Admittedly, the API offers a lot of flexibility and nice-to-haves when it comes to configuring the project's SCM, but it seems like overkill.

If the Literate Plugin and the Branch API Plugin become stable, and the API can be modified to support the functionality described in the first point, there is a likelihood that this plugin will adopt the API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.