It is always better to start early and visualize the things we want to achieve. That is the objective of this chapter. It will be easy to realize the importance of this chapter when we are at the last line of the final chapter of this book. One of the highlights of Jenkins 2 is built-in support for delivery pipelines. We know that Jenkins is a continuous integration server, but what if we wanted to use it for continuous delivery or continuous deployment too? Automation and orchestration both are equally important while dealing with the application delivery pipeline. This chapter describes in detail how to create the pipelines of different jobs for a sample Java Enterprise Edition (Java EE) application. It will also cover the deployment of an application to a local web or application server and the configuration of a build pipeline for the lifecycle of continuous integration. This way, Jenkins users can model application delivery pipelines as the code. Once we make it into code, we can store in a code repository and it can be managed in a better way. An important benefit is a collaboration. As it can be stored in version control, different teams can reuse it for different operations, based on the environment. Readers will learn how to manage the lifecycle of continuous integration, including pulling code from a code repository, building the code, executing unit tests, and static code analysis using different jobs.
We will cover the following topics:
- The built-in delivery pipelines of Jenkins 2
- Build pipeline configuration for end-to-end automation for managing the lifecycle of continuous integration
- Deploying a WAR file from Jenkins to a local Tomcat server
Creating built-in delivery pipelines
Jenkins 2 provides a way to create delivery pipelines using a domain-specific language (DSL). The steps for creating a built-in delivery pipeline are as follows: Go to the Jenkins dashboard and click on New Item.1. Enter an item name, say PetClinic-Pipeline, and select Pipeline, as shown in2. the following screenshot, and click on OK:
For more details get the DevOps for Web Development book.
It is also available at: