How to Contribute to the Jenkins Project: A Step-by-Step Developer Guide

To contribute to Jenkins, fork the jenkinsci/jenkins repository, configure JDK 21+ and Maven 3.9.6+, build the WAR using the quick-build Maven profile, and submit pull requests that meet the requirement of two approvals and passing CI on ci.jenkins.io.

Jenkins is an open-source automation engine written in Java that relies on a structured GitHub workflow. Contributing to the project involves setting up a Maven-based development environment, building the WAR artifact, and following specific testing and code quality standards defined in CONTRIBUTING.md.

Set Up Your Development Environment

Jenkins core is a Java Maven project that requires specific toolchain versions documented in CONTRIBUTING.md lines 12-15:

  • JDK 21 or 25 (Temurin or OpenJDK distribution)
  • Maven 3.9.6 or higher
  • Node.js with Corepack enabled for frontend work

Clone your fork and verify your environment:

git clone https://github.com/<your-username>/jenkins.git
cd jenkins
mvn -version

For frontend development, ensure Corepack provides the yarn binary as referenced in the CONTRIBUTING.md section on running the Yarn frontend build.

Build Jenkins from Source

The fastest way to generate a WAR file without running the full test suite is using the quick-build profile. This command builds the specific modules required for the WAR artifact:

mvn -am -pl war,bom -Pquick-build clean install

The resulting artifact appears at war/target/jenkins.war. This approach skips lengthy integration tests while validating compilation and basic packaging.

Run a Local Development Instance

To test changes interactively, launch Jenkins with Jetty using specific JVM arguments to handle Java module system requirements. Set MAVEN_OPTS to open required Java base modules:

MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED \
            --add-opens java.base/java.io=ALL-UNNAMED \
            --add-opens java.base/java.util=ALL-UNNAMED' \
mvn -pl war jetty:run

This starts a development server with remote debugging capabilities enabled, allowing you to attach a debugger from your IDE on the default port.

Contribute Frontend Changes

For modifications to the Jenkins UI, use the Webpack development server for live reloading. First, configure your PATH to use the Node and Yarn binaries managed by the project's Corepack setup:

export PATH=$PWD/node:$PWD/node/node_modules/corepack/shims:$PATH

Start the frontend dev server:

yarn start

When running the backend simultaneously, launch it with -Dskip.yarn to prevent duplicate asset processing and port conflicts as documented in CONTRIBUTING.md.

Code Quality and Linting

Jenkins enforces code style through automated linting for both backend and frontend code. Run these commands before committing:

  • Backend formatting: mvn spotless:apply
  • Frontend formatting: yarn lint:fix

Both tools integrate into the standard Maven build lifecycle defined in pom.xml, but running them manually provides rapid feedback during development.

Testing Your Changes

Jenkins provides three distinct test profiles to balance speed against coverage:

  • -Plight-test: Runs unit tests only (fastest feedback)
  • -Psmoke-test: Executes unit tests plus selected functional tests
  • all-tests (default): Runs the complete test suite

Execute a specific profile using:

mvn test -Plight-test

For UI-heavy modifications, add Acceptance Test Harness (ATH) tests in the separate ATH repository as referenced in CONTRIBUTING.md.

Submit Your Contribution

Create a pull request against the master branch of jenkinsci/jenkins following these steps:

  1. Create a feature branch: git checkout -b my-feature
  2. Commit your changes with descriptive messages
  3. Push to your fork: git push origin my-feature
  4. Open a PR using the template at .github/PULL_REQUEST_TEMPLATE.md

Merge requirements include:

  • Two approvals from core maintainers
  • No needs-fix or needs-justification labels remaining
  • Successful completion of CI pipelines on ci.jenkins.io

If your PR remains unreviewed for three days, ping @jenkinsci/core-pr-reviewers for attention. After merge, changes enter the weekly release line automatically, with potential backporting to LTS handled by the dedicated LTS team.

Summary

  • Fork and clone the jenkinsci/jenkins repository to your GitHub account
  • Install JDK 21+ and Maven 3.9.6+ to satisfy build requirements documented in CONTRIBUTING.md
  • Use mvn -am -pl war,bom -Pquick-build for rapid WAR generation during development
  • Run mvn spotless:apply and yarn lint:fix to ensure code quality before submission
  • Open PRs against master following the template in .github/PULL_REQUEST_TEMPLATE.md and secure two approvals for merge

Frequently Asked Questions

What Java version is required to build Jenkins?

You need JDK 21 or JDK 25 (Temurin or OpenJDK distributions) according to CONTRIBUTING.md lines 12-14. The build system explicitly validates Java version compatibility during the Maven initialization phase.

How do I run Jenkins locally for testing?

Execute mvn -pl war jetty:run with specific MAVEN_OPTS to handle Java module system access. Set the JVM arguments to open java.base modules for java.lang, java.io, and java.util packages to avoid reflection-related runtime errors in the development environment.

What are the requirements for getting a PR merged?

Pull requests require two approvals from core maintainers, no outstanding needs-fix or needs-justification labels, and successful continuous integration results on ci.jenkins.io. If reviews stall for three days, contributors should ping @jenkinsci/core-pr-reviewers according to the proposing-changes section of CONTRIBUTING.md.

Can I contribute to Jenkins if I only know JavaScript?

Yes. Jenkins accepts frontend contributions for its UI components. Install Node.js and enable Corepack to access the project's Yarn setup, then use yarn start for the Webpack dev server. Submit changes following the same PR template and review process as backend code, ensuring you run yarn lint:fix before committing.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →