Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By : Mitesh Soni, Alan Mark Berg
Book Image

Jenkins 2.x Continuous Integration Cookbook - Third Edition

By: Mitesh Soni, Alan Mark 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)

Remotely triggering jobs through the Jenkins API

Jenkins has a remote API that allows you to enable, disable, run, and delete jobs; it also lets you change the configuration. The API is increasing with each Jenkins version. To get the most up-to-date details, you will need to review http://yourhost/job/Name_of_Job/api/. Where yourhost is the location of your Jenkins server, Name_of_Job is the name of a job that exists on your server.

This recipe details how you can trigger builds remotely by using security tokens. This will allow you to run other jobs from within Maven.

Getting ready

This recipe expects Jenkins security to be turned on so that you can log in as a user. It also assumes you have a modern version of wget (http...