Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By : Mitesh Soni, Berg
Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By: Mitesh Soni, Berg

Overview of this book

Jenkins 2.x is one of the most popular Continuous Integration servers in the market today. It was designed to maintain, secure, communicate, test, build, and improve the software development process. This book will begin by guiding you through steps for installing and configuring Jenkins 2.x on AWS and Azure. This is followed by steps that enable you to manage and monitor Jenkins 2.x. You will also explore the ways to enhance the overall security of Jenkins 2.x. You will then explore the steps involved in improving the code quality using SonarQube. Then, you will learn the ways to improve quality, followed by how to run performance and functional tests against a web application and web services. Finally, you will see what the available plugins are, concluding with best practices to improve quality.
Table of Contents (11 chapters)

What this book covers

Chapter 1, Getting Started with Jenkins, covers how to install Jenkins 2.x on Windows, CentOs, Microsoft Azure, and AWS. There are important recipes that show how to install or upload plugins, how to configure Proxy, how to configure JENKINS_HOME and tools in Manage Jenkins. This chapter will also cover how to create freestyle jobs for Ant and Maven projects

Chapter 2, Management and Monitoring of Jenkins, helps us understand master/agent architecture, how to manage Jenkins Build jobs using Eclipse, backing up and restoring Jenkins, command-line options in Jenkins using Jenkins CLI, managing disk usage, shutting down Jenkins safely, monitoring Jenkins, and configuring email notifications.

Chapter 3, Managing Security, covers how to improve security with Jenkins configuration, configure Matrix-based Security and handle a Project-based Matrix Authorization Strategy. It will also cover Jenkins and its integration with OpenLDAP and Active Directory. Later in the chapter, we will cover Jenkins and OWASP Zed Attack Proxy Integration, finding 500 errors and XSS attacks in Jenkins through fuzzing, exploring the OWASP Dependency-Check plugin, and working with the Audit Trail plugin.

Chapter 4, Improve Code Quality, explores the use of source code metrics. To save money and improve quality, you need to remove defects in the software life cycle as early as possible. This chapter covers details on how to integrate Jenkins with SonarQube, how to update center in SonarQube, quality gates, quality profiles and rules, verifying HTML, CSS, and JavaScript validity using SonarQube, verifying Java code using SonarQube, and configuring SonarQube as a Windows service.

Chapter 5, Building Applications in Jenkins, details approaches to configuring Ant, Maven, and Android projects for execution, how to configure environment variables, running Groovy scripts through Maven, running Ant through Groovy in Maven, and remotely triggering jobs through the Jenkins API.

Chapter 6, Continuous Delivery, discusses Continuous Delivery, how to archive artifacts, copying artifact from other build jobs, integrating Jenkins with Artifactory, deploying a WAR file from Jenkins to Tomcat, AWS Beanstalk, Azure App Services, and how to promote builds.

Chapter 7, Continuous Testing, details Continuous Testing, how to publish unit testing reports from Jenkins, creating Selenium test cases using Eclipse, integrating Jenkins and Selenium for functional testing, Jenkins and Cucumber Test reports, creating load tests in Apache JMeter, executing load tests from Jenkins, reporting JMeter performance metrics, and testing with FitNesse.

Chapter 8, Orchestration, explores orchestration of a pipeline, understanding upstream and downstream jobs, configuring upstream and downstream jobs, configuring a build pipeline, creating a pipeline job, using a sample pipeline for execution, configuring a pipeline job for end-to-end automation, and getting started with the Blue Ocean dashboard.

Chapter 9 , Jenkins UI Customization, details skinning Jenkins with the simple themes plugin, skinning and provisioning Jenkins using a WAR overlay, generating a home page, creating HTML reports, efficient use of views, saving screen space with the Dashboard View plugin, making noise with HTML5 browsers, and an extreme view for reception areas.