This page provides information about contributing code to the Jenkinsfile Runner codebase.
- Fork the repository on GitHub
- Clone the forked repository to your machine
- Install the development tools. In order to develop Jenkinsfile Runner, you need the following tools:
- Java Development Kit (JDK) 8.
- We usually use OpenJDK but you can use other JDKs as well.
- Maven 3.5.4 or above.
- Any IDE which supports importing Maven projects.
- Docker.
- Make.
The build flow for Jenkinsfile Runner is built around Maven and Docker.
Run mvn clean package
for the project to be just built and mvn clean package -Denvironment=test
for the project
to be built and the integration tests to be launched, which are based on the Jenkinsfile Runner Test Framework.
This will generate an assembly artifact through the appassembler-maven-plugin
that can be configured and used to run Jenkinsfiles.
In case you are interested in generating a Docker image containing both the assembly and the configuration, see DOCKER.md.
There you will also find information regarding debugging Jenkinsfile Runner. In case you are more interested in the architecture, see DEVELOPER.md.
Jenkinsfile Runner includes integration tests as a part of the repository.
These tests (tests
module) take a while even on server-grade machines.
All of them will be launched by the continuous integration instance,
so there is no strict need to run them before proposing a pull request.
In case you want to run them, see the previous section. You could also enter the tests
directory and execute the make
command.
All proposed changes are submitted and code reviewed using the GitHub Pull Request process.
To submit a pull request:
- Commit changes and push them to your fork on GitHub. It is a good practice to create branches instead of pushing to master.
- In GitHub Web UI click the New Pull Request button
- Select
jenkinsci/jenkinsfile-runner
as base fork andmaster
asbase
, then click Create Pull Request - Fill in the Pull Request description according to the changes.
- Click Create Pull Request
- Wait for CI results/reviews, process the feedback.
It is recommended that new features/changes include testing proving the changes are working correctly.
Jenkinsfile Runner uses ci.jenkins.io as Continuous Integration server and uses Jenkins Pipeline to run builds. See https://ci.jenkins.io/blue/organizations/jenkins/Tools%2Fjenkinsfile-runner/ . The code for the build flow is stored in the Jenkinsfile in the repository root.
If you want to update that build flow (e.g. "add more checks"), just submit a pull request.