Book Image

Learning Continuous Integration with Jenkins

By : Nikhil Pathania
Book Image

Learning Continuous Integration with Jenkins

By: Nikhil Pathania

Overview of this book

In past few years, Agile software development has seen tremendous growth across the world. There is huge demand for software delivery solutions that are fast yet flexible to frequent amendments. As a result, CI and continuous delivery methodologies are gaining popularity. Jenkins’ core functionality and flexibility allows it to fit in a variety of environments and can help streamline the development process for all stakeholders. This book starts off by explaining the concepts of CI and its significance in the Agile world with a whole chapter dedicated to it. Next, you’ll learn to configure and set up Jenkins. You’ll gain a foothold in implementing CI and continuous delivery methods. We dive into the various features offered by Jenkins one by one exploiting them for CI. After that, you’ll find out how to use the built-in pipeline feature of Jenkins. You’ll see how to integrate Jenkins with code analysis tools and test automation tools in order to achieve continuous delivery. Next, you’ll be introduced to continuous deployment and learn to achieve it using Jenkins. Through this book’s wealth of best practices and real-world tips, you'll discover how easy it is to implement a CI service with Jenkins.
Table of Contents (15 chapters)
Learning Continuous Integration with Jenkins
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Version control Jenkins configuration


In the first few chapters, we saw how to take Jenkins backup. We did this in two ways—either by creating a Jenkins job that regularly takes Jenkins backup of the whole Jenkins folder, or by using the Jenkins backup and restore plugin.

This in itself is a version control, as we are saving the whole Jenkins configurations at a desired point of time and at regular intervals, or whenever we do a major Jenkins configuration. However, this is not the best way to record every miniscule change in the Jenkins configuration separately.

Nevertheless, Jenkins backup is the best way to restore Jenkins during a catastrophic event where the whole server goes haywire.

Let's see how to version control Jenkins configuration using a plugin.

Using the jobConfigHistory plugin

This plugin saves a copy of the configuration file of a job (config.xml) for every change made and of the system configuration.

It is also possible to get a side-by-side view of the differences between two...