Skip to content

The Jenkins Templating Engine is a Jenkins plugin powering Booz Allen's Solutions Delivery Platform

License

Notifications You must be signed in to change notification settings

boozallen/jenkins-templating-engine

Repository files navigation

Jenkins Templating Engine

Jenkins Plugin GitHub Release Jenkins Plugin Installs Gitter

Table of Contents:

Overview

The Jenkins Templating Engine (JTE) is a plugin originally created by Booz Allen Hamilton enabling pipeline templating and governance.

Different teams are going to use different tools, but the flow of the pipeline is typically consistent. Having to maintain a Jenkinsfile in every source code repository introduces real challenges when scaling a DevOps pipeline across an organization:

  1. Time: Typical Jenkins Shared Libraries help to consolidate common pipeline code, but software teams should focus on where they provide business value: building their application. Jenkins can have a nontrivial learning curve and there's a desire to achieve economies of scale within an organization.
  2. Governance: Having a Jenkinsfile in every repository makes it difficult, if not impossible, to ensure that every team is following an agreed upon business process to get code from developer's laptops out to users in production. Furthermore, developer's have access to this Jenkinsfile and could have permission to skip required quality or security gates.
  3. Maintainability: Incorporating lessons learned into the pipeline over time becomes untenable when there are multiple pipeline definitions - it requires opening a Pull Request across each source code repository.

JTE aims to remove this friction by pulling the Jenkinsfile out of individual source code repositories and instead, creating tool-agnostic pipeline templates that can be reused across multiple teams.

For the academic coders out there, one way to describe the Jenkins Templating Engine is an implementation of the Template Method Design Pattern for Jenkins pipelines. JTE essentially separates the business logic of a pipeline from the technical implementation.

Templates define a workflow by calling steps. Steps are contributed by libraries. Instead of a Jenkinsfile in each source code repository, teams can now inherit a pipeline template (or choose a template from a pipeline catalog) and then configure the pipeline through a configuration file that specifies what libraries to load. Based on what libraries are loaded, the same pipeline can be used to support an arbitrary combination of tools.

If your pipeline template is setup to build, test, scan, deploy then it doesn't matter if you're using Docker, Maven, SonarQube, and Helm or NPM, Fortify, and S3: both pipelines can now be executed via the same pipeline template.

Learn More

There are many resources available to help you get started:

Participate

There are many ways to get involved. We look forward to hearing from you.

Adopters

If you're using the Jenkins Templating Engine we would love to hear about it! Feel free to open a Pull Request with an update to our ADOPTERS.adoc file and your use case will be displayed on the adopters page.

Join the Conversation

JTE has a channel in the Jenkins community's gitter space. It's a great place to ask questions or propose ideas for the future of JTE.

Report a Bug or Request a Feature

Something not quite working right? Have a cool idea for how to make JTE better? Open an Issue on the JTE repo and let's get the conversation started.

Contributions are Welcome!

No contribution is too small and are greatly appreciated.

Documentation

Documentation is crucial to the health of JTE as a framework. Please feel free to update the documentation to resolve typos, make an explanation more clear, or add a new page to explain a particular pattern or concept.

JTE is the core engine that powers Booz Allen's open source DevSecOps capability, the Solutions Delivery Platform. To facilitate the aggregation of documentation, we leverage a documentation framework called Antora. Documentation for Antora is written in AsciiDoc. The documentation can be found in the docs directory. To view your changes locally, run make docs and then open docs/html/index.html.

Unit Tests

The Jenkins Templating Engine is written in Groovy and Unit Tests for the Jenkins Templating Engine are written using Spock.

Squash Some Bugs

Feel free to open a Pull Request that addresses one of the bugs outlined in an Issue!

Feature Development

New features are welcome. JTE strives to be an unopinionated framework for creating tool-agnostic pipeline templates. Some features are great ideas, but belong in a separate plugin or can be implemented through libraries. Because of this, it would be best to open an Issue to discuss the feature first so we can have a conversation about it to see if there's already a way to achieve the same functionality without bringing it into JTE's core.

About

The Jenkins Templating Engine is a Jenkins plugin powering Booz Allen's Solutions Delivery Platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages