Since its inception, one of the foundational features in Jenkins Enterprise by CloudBees has been the Folders plugin, which allows you to group jobs into nested hierarchies. Unlike views, folders actually change where job data is stored on disk and the job’s URL, and a folder can act as a container for extra features or special properties to be made available to all jobs within it, such as credentials. In fact numerous Jenkins Enterprise features, such as Role-based Access Control, would not be possible without the structure provided by folders. The plugin has also long been available for free, with the only requirement being a registration on the CloudBees site, and some people have used it in this way outside of Jenkins Enterprise.
The issue we have come across again and again is that for folders to be truly valuable, other plugins need to integrate with it. There have long been APIs in Jenkins core that make this possible—
getItemByFullName, and so on—and both CloudBees developers and open-source plugin developers have done a lot of work to ensure that jobs contained in folders behave smoothly with other Jenkins core and plugin features. But APIs are only half the story; good integration requires thorough testing, both manual and automated. When the “reference implementation” of hierarchical jobs was a free-as-in-beer plugin, development and testing suffered. Other plugins could not simply add Folders as a test dependency (though
MockFolder in Jenkins core helps in some cases); manual testing required the hassle of creating a new CloudBees free license for each test environment. Some plugin authors were understandably reluctant to even accept pull requests useful only for integration with code they could not see or debug for themselves.
To obviate all these problems and increase adoption of folders, we have decided to release the basic functionality of Folders as an open-source plugin hosted on GitHub, like other Jenkins plugins. This 4.0 release is fully functional on its own, but some of the advanced features have been retained in Jenkins Enterprise (in the Folders Plus plugin): the Move action, some health reports and icons, the Environment variables property, the Pull information from nested job list view column, and the Restrict the kind of children in this folder option. The core folder functionality and all of the APIs and extension points are available in the open-source plugin.
Are you already running the Folders plugin? If so, you may upgrade to 4.0 today, but if you are using it via the free license, be aware that you would lose access to the advanced functions. You can do without them, stay on 3.15 or earlier, or upgrade to Jenkins Enterprise. If you are using Jenkins Enterprise, feel free to upgrade but be sure to upgrade Folders (to 4.0), Folder Plus (to 2.0), and Role-based Access Control (to 4.0) all together, to make sure you do not temporarily lose access to your existing settings.
Before joining CloudBees in 2012, Jesse worked on the NetBeans Java IDE core module system and its plugin tooling. Along the way he became an Ant committer and contributed to other key projects including Maven, Mercurial and, of course…Jenkins, for which he was an early committer and developed the IDE integration. He co-authored an O’Reilly book on the NetBeans Platform and speaks on related topics.