Self service Jenkins job generation using Jenkins Job DSL plugin groovy scripts. Reads .jervis.yml and generates a job in Jenkins.
Jervis: Jenkins as a service
[![Build Status][status-build]][jervis-ci] [![Coverage Status][status-coverage]][jervis-coveralls] [![Maven Central Release][status-release]][maven-release] [![GH commits since latest release][commits-since]][commits-since-diff]
Project status:* [released to maven central][maven-release]. Currently Targeted platforms:* Jenkins server host:* Linux and Mac OS X (Windows compatible) Jobs on clients:* Linux only (Multi-platform capable)
What is Jervis?
- What is Jervis? A library for [Job DSL plugin][jenkins-plugin-job-dsl]
- [SCM Filter Jervis plugin][scm-filter-jervis] is available for multibranch
Documentation
- [Jervis Wiki][jervis-wiki]
The library API is also [fully documented][jervis-api-docs]. To generate the latest developer docs execute the following command.
./gradlew groovydoc
The documentation can be found in build/docs/groovydoc.
Provided examples
- Bootstrapping Jenkins: Example [bootstrap for
- Job DSL Script: Example Job DSL script is
- Jenkins build node: There's also a [docker container][jervis-docker] designed
- Jervis configuration files: [
lifecycles.yaml][yaml-lifecycles],
toolchains.yaml][yaml-toolchains], and [platforms.yaml][yaml-platforms].
- Shared pipeline library:
vars/andresources/
More about Jervis
Jervis is a combination of some letters in the words Jenkins and Travis: JEnkins tRaVIS. [Jenkins][jenkins] is a [continuous integration][wiki-ci] tool which is typically installed on premises. [Travis][travis] is a hosted, distributed continuous integration system used by many [open source][wiki-os] projects. Both Jenkins and Travis have paid and enterprise offerings.
Jervis uses Travis-like job generation using the [Job DSL plugin][jenkins-plugin-job-dsl] and groovy scripts. It reads the .jervis.yml file of a project and generates a job in Jenkins based on it. If .jervis.yml doesn't exist then it will fall back to using the [.travis.yml][travis-yaml] file.
For development planning and other documentation see the [Jervis wiki][jervis-wiki]. If you wish to stay up to date with the latest Jervis news then please feel free to [watch this repository][watch-repo] because I use the issue tracking and wiki for planning.
Why Jervis?
What is Jervis attempting to scale? Let's talk about some scale bottlenecks that have been overcome by Jenkins (formerly Hudson) and its community.
The scaling issue is a main bullet. The solution for the issue is in a sub-bullet.
- Developers are challenged with integrating work, building often, and even
- Jenkins infrastructure is strained when too many agents are in one server and
- Jenkins jobs suffer from a lot of duplicate code. It is difficult to fix a
- Onboarding new projects in a Jenkins installation can be difficult. Typically
Set up
To include this library for use in your Job DSL plugin scripts you only need include it in your build tool.
Maven
<dependency>
<groupId>net.gleske</groupId>
<artifactId>jervis</artifactId>
<version>2.4</version>
<type>pom</type>
</dependency>
Gradle
Your Job DSL scripts should have a build.gradle file which has the following contents.
apply plugin: 'maven'
repositories { mavenCentral() }
configurations { libs }
dependencies { libs 'net.gleske:jervis:2.4' }
task cleanLibs(type: Delete) { delete 'lib' }
task libs(type: Copy) { into 'lib' from configurations.libs }
defaultTasks 'clean', 'libs' clean.dependsOn cleanLibs
Then execute ./gradlew libs to assemble dependencies into the lib directory of the Jenkins workspace. Don't forget to add lib to the classpath. This must be done before you configure your Jenkins job to execute Job DSL scripts.
Interactive debugging
Groovy Console is built into the Gradle file.
./gradlew console
Other development commands
Generate code coverage reports.
./gradlew clean check jacocoTestReport
Build the jar file.
./gradlew clean jar
Sign build jars and sign archives.
./gradlew clean check signArchives
See also RELEASE.md.
Local SonarQube Analysis
See SonarQube README.
License
Copyright 2014-2026 Sam Gleske
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[commits-since]: https://img.shields.io/github/commits-since/samrocketman/jervis/latest/main [commits-since-diff]: https://github.com/samrocketman/jervis/compare/jervis-2.4...HEAD [jenkins-plugin-docker]: https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin [jenkins-plugin-job-dsl]: https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin [jenkins]: https://jenkins-ci.org/ [jervis-api-docs]: http://sam.gleske.net/jervis-api/ [jervis-ci]: https://github.com/samrocketman/jervis/actions?query=branch%3Amain [jervis-coveralls]: https://coveralls.io/github/samrocketman/jervis [jervis-docker]: https://github.com/samrocketman/docker-jenkins-jervis [jervis-jenkins-bootstrap]: https://github.com/samrocketman/jenkins-bootstrap-jervis [jervis-wiki-build-tools]: https://github.com/samrocketman/jervis/wiki/Supported-Tools [jervis-wiki-languages]: https://github.com/samrocketman/jervis/wiki/Supported-Languages [jervis-wiki-overview]: https://github.com/samrocketman/jervis/wiki/Build-overview [jervis-wiki]: https://github.com/samrocketman/jervis/wiki [yaml-lifecycles]: resources/lifecycles-ubuntu2204-stable.yaml [yaml-platforms]: resources/platforms.yaml [yaml-toolchains]: resources/toolchains-ubuntu2204-stable.yaml [maven-release]: https://search.maven.org/search?q=g:net.gleske%20AND%20a:jervis&core=gav [milestone-progress]: https://github.com/samrocketman/jervis/milestones [pipeline]: https://jenkins.io/doc/book/pipeline/shared-libraries/ [scm-filter-jervis]: https://plugins.jenkins.io/scm-filter-jervis/ [status-build]: https://img.shields.io/github/actions/workflow/status/samrocketman/jervis/ci.yaml?branch=main [status-coverage]: https://coveralls.io/repos/github/samrocketman/jervis/badge.svg?branch=main [status-release]: https://img.shields.io/maven-central/v/net.gleske/jervis?color=success [travis-yaml]: http://docs.travis-ci.com/user/build-configuration/ [travis]: https://travis-ci.org/ [watch-repo]: https://help.github.com/articles/watching-repositories/ [wiki-ci]: https://en.wikipedia.org/wiki/Continuous_integration [wiki-os]: http://en.m.wikipedia.org/wiki/Open_source