Continuous Integration - buildPlugin

This site is the new docs site currently being tested. For the actual docs in use please go to https://www.jenkins.io/doc.

The Jenkins project runs its own Jenkins instance for CI builds on ci.jenkins.io. It will build all plugin repositories in the jenkinsci organization that have a Jenkinsfile in the root of the repository.

The typical plugin build (Maven or Gradle) can be run by just having the following statement in the Jenkinsfile:

buildPlugin(
  useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
  configurations: [
    [platform: 'linux', jdk: 17],
    [platform: 'windows', jdk: 11],
])

'Gradle support in buildPlugin() is deprecated and will be eventually removed. Please use:'

buildPluginWithGradle(
  useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
  configurations: [
    [platform: 'linux', jdk: 17],
    [platform: 'windows', jdk: 11],
])
If the Jenkinsfile configuration includes Java 8, you will receive a low-level class version error when using version 4.52 or later of the plugin parent POM.

To learn more about the Pipeline library providing this functionality, see its GitHub repository.