Fork us on GitHub
×
Find plugins

Branch API1.11.1Minimum Jenkins requirement: 1.642.3ID: branch-api

Installs: 61702
Last released: 3 months ago

Maintainers
Stephen Connolly

Plugin Information

Branch API Plugin

This plugin provides an API for multiple branch based projects.

The following concepts are provided:

  • Multibranch projects: projects consisting in a group of several projects, one for each defined branch.
  • Organizational folders: a folder-like collection of Multibranch projects, one per repository.
  • Branch properties: add additional information linked to the branch, which can then be used to take decisions. Some properties are provided:
    • Do not trigger builds for branch.
    • Do not trigger builds for organizational folder.
    • Override triggering behaviour for multibranch project or organizational folder.
    • Untrusted author.
    • Limit builds for a branch to a certain rate.
    • Discard old builds for branch.

Version History

Version 2.0.0 (Jan 16, 2016)

  •  Please read this Blog Post before upgrading
  • (I will be updating the rest of the changes and removing this line after the chain of releases is done - SC)

Version 2.0.0-beta-1 (Dev 16, 2016)

  • Available in the experimental update center only
  • Pick up API changes from SCM API 2.0 (requires SCM API 2.0.1-beta-1 and if you have either of the github-branch-source or bitbucket-branch-source plugins you must upgrade them to at least 2.0.0-beta-1)

Version 1.11.1 (Nov 04, 2016)

  • JENKINS-39520 Error when dynamically installing multiple branch source plugins.

Version 1.11 (Sep 23, 2016)

  • JENKINS-34564 Branch projects now get custom workspace paths inside the node’s workspace directory, capped by default at 80 characters and using only ASCII letters, numbers, and simple punctuation (in particular, no %).
  • JENKINS-37219 Added a job property for overriding the implicit branch indexing trigger flag, allowing a multibranch Jenkinsfile to customize its own triggering behavior after the initial build.
Some projects running external processes that cannot handle even moderately long pathnames will not work with the new default workspace locations. The system property jenkins.branch.WorkspaceLocatorImpl.PATH_MAX may be set to 0 to restore the previous behavior (which will then break some processes which cannot handle funny characters, or projects using long branch names etc.). The default value is 80; values as low as 54 (but no lower) are possible. When feasible, fix the external process to be more robust, or on Windows use
\\?\

as a prefix before the remote filesystem root.

Another workaround in Pipeline scripts is to use the ws step with an absolute pathname. You can then choose any path, and concurrent builds will still get distinct workspaces automatically; but you are on the hook for finding a valid path on the node, unrelated projects might overwrite each other’s workspaces between builds (reducing beneficial caches of SCM checkouts and the like), and the custom workspaces will not be automatically deleted if the branch project is deleted. The first problem could be avoided by using a pathname like ../custom rather than an absolute path.

Note that the sshagent Pipeline step (SSH Agent Plugin) when used inside an Image.inside block (Docker Pipeline Plugin) will not currently work when the workspace path exceeds 108 characters, due to a poor choice of constant in most Linux kernels: JENKINS-36997.

A full fix should probably come in JENKINS-2111 for all project types.

Version 1.10.2 (Sep 03, 2016; 1.10.1 burned)

Version 1.10 (Jun 09, 2016)

  • JENKINS-34246 Improve organization folder API to allow project recognizers to indicate removed repositories or edited configuration.

Version 1.9 (Jun 01, 2016)

  • JENKINS-32178 Broken links in custom views of multibranch projects.

Version 1.9-beta-1 (May 23, 2016)

Version 1.8 (May 13, 2016)

Version 1.7 (Apr 29, 2016)

  • JENKINS-34259 Some links (in left menu) in Pipeline Multibranch projects and GitHub Organization projects are broken when there are no branch sources defined or the GitHub Organization is empty.
  • Documented build environment variables.

Version 1.6 (Apr 11, 2016)

Version 1.5 (Mar 21, 2016)

  • JENKINS-32670 Suppress whole branch property UI for project types which do not have any supported branch properties, such as multibranch Pipeline.

Version 1.4 (Mar 14, 2016)

  • JENKINS-33106 Organization folder types not displayed under New Item without a restart.
  • JENKINS-33309 Using API for defining variables associated with pull requests.
  • JENKINS-32782 Welcome view failed to display Delete Folder link.

Version 1.3 (Feb 18, 2016)

  • Prevent NPE while unserialization of BranchSources with a null SCMSource
  • JENKINS-32493 Adapt to Parent POM 2.3

Version 1.1 (Jan 28, 2016)

  • JENKINS-31949 Bogus New Item option inside folders.
  • JENKINS-31516 Children not reindexed on organization folder reindex.
  • Useless MultiBranchProjectDescriptor.getSCMDescriptors API deleted.
  • JENKINS-31381 Show more helpful welcome text for empty multibranch projects and organization folders.

Version 1.0 (Nov 12, 2015)

  • Fix to RateLimitBranchProperty for the benefit of Workflow multibranch properties step.
  • Ensure that SCMSource.setOwner is called consistently.
  • JENKINS-30252 New environment variable BRANCH_NAME.
  • JENKINS-30595 Implemented new API.
  • Suppress non-read view permissions on multi-branch projects within an organization folder.
  • Add PeriodicFolderTrigger by default.
  • JENKINS-30744 Fixed handling of branches with slashes in the name.
  • JENKINS-31432 NPE under some conditions.

Version 0.2-beta-5

Warning: settings compatibility for this release has not yet been tested. If you have an existing project using the Literate plugin in particular, the dead branch retention strategy might be reset to “delete immediately” after the upgrade.

  • Introduced an “organization folder” top-level item type. Hidden unless there are some SCM providers (GitHub Branch Source Plugin), and project factories (Pipeline Plugin).
  • Major refactoring to use ComputedFolder API in CloudBees Folders Plugin.
  • Always run branch indexing on the master node.
  • Compatibility with 1.576+ icon captions.

Version 0.2-beta-4

  • API changes useful for Workflow.

Version 0.1

  • Initial release.
ArchivesGet past versions
Labels
This plugin has no labels
Open Issues

See here for any open issues for this plugin.