Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Jenkins 2.x Continuous Integration Cookbook
Jenkins 2.x Continuous Integration Cookbook

Jenkins 2.x Continuous Integration Cookbook: Over 90 recipes to produce great results using pro-level practices, techniques, and solutions , Third Edition

Arrow left icon
Profile Icon Mitesh Soni Profile Icon Berg
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
Paperback Oct 2017 438 pages 3rd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Mitesh Soni Profile Icon Berg
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
Paperback Oct 2017 438 pages 3rd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Jenkins 2.x Continuous Integration Cookbook

Getting Started with Jenkins

In this chapter, we will discuss how to install and configure Jenkins, and what new features or UI improvements are available from Jenkins 2 and later. We will cover the following recipes:

  • Installing Jenkins 2 on Windows
  • Installing Jenkins 2 on CentOS
  • Installing Jenkins 2 on Azure
  • Installing Jenkins as a service in Windows
  • Installing plugins in Jenkins
  • Uploading plugins in Jenkins
  • Configuring proxy in Jenkins
  • Configuring global settings in Jenkins
  • Configuring JENKINS_HOME
  • Understanding JENKINS_HOME directory
  • Using different ports for Jenkins
  • Configuring JAVA_HOME in Jenkins
  • Configuring Git in Jenkins
  • Configuring ANT_HOME in Jenkins
  • Configuring MAVEN_HOME in Jenkins
  • Configuring GRADLE_HOME in Jenkins
  • Creating a Freestyle job for an Ant project
  • Creating a Maven job for a Maven project

Introduction

Jenkins is an open source automation server that is widely used by many organizations to implement popular DevOps practices, such as Continuous Integration and Continuous Delivery. Jenkins is feature-rich and is vastly extendable through plugins. Further, Jenkins and its plugins improve rapidly. There is a new minor version of Jenkins released weekly, mostly with improvements, occasionally with bugs. The community manages core stability via the use of a long-term support release of Jenkins, which is mature and less feature-rich when compared to the latest version. For a stable system in a complex environment, you need to monitor, clean up storage, back up, keep control of your Jenkins scripts, and consistently clean and polish. This chapter has recipes for the most common tasks. Proper maintenance lowers the risk of failures, such as:

  • New plugins causing exceptions: There are a lot of good plugins being written with rapid version changes. In this situation, it is easy for you to accidentally add new versions of plugins with new defects. There have been a number of occasions during upgrades when suddenly the plugin does not work. To combat the risk of plugin exceptions, consider using a test Jenkins instance before releasing to a critical system.
  • Storage overflowing with artifacts: If you keep a build history that includes artifacts such as WAR files, large sets of JAR files, or other types of binaries and source code, then your storage space will be consumed at a surprising rate. Storage costs have decreased tremendously, but storage usage equates to longer backup times and more communication from slave to master. To minimize the risk of disk overflowing, you will need to consider your backup and restore policy and the associated build retention policy expressed in the advanced options of jobs.
  • Script spaghetti: As jobs are written by various development teams, the location and style of the included scripts vary. This makes it difficult for you to keep track. Consider using well-defined locations for your scripts and a scripts repository managed through a plugin.
  • Resource depletion: As memory is consumed, or the number of intense jobs increases, then Jenkins slows down. Proper monitoring and quick reactions
    reduce impact.
  • A general lack of consistency between jobs due to organic growth: Jenkins is easy to install and use. The ability to seamlessly turn on plugins is addictive. The pace of adoption of Jenkins within an organization can be breathtaking. Without a consistent policy, your teams will introduce lots of plugins and also lots of ways of performing the same work. Conventions improve consistency and readability of jobs and thus decrease maintenance.

The Jenkins community is working hard on your behalf. If you see an issue, please report it back.

Signing up to the community:

To add community bug reports or modify wiki pages, you will need to create an account at: https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking.

Installing Jenkins 2 on Windows

Let's install Jenkins 2 on a Windows operating system. It can be a physical machine, virtual machine available on Cloud.

Getting ready

To carry out this recipe, you need to download Jenkins.

For a business unit, it is advisable to have the following requirements:

  • Java 8
  • 4 GB + RAM
  • 500 GB+ free disk space

How to do it...

Let's install Jenkins now by following these steps:

  1. Go to https://jenkins.io.
  1. Click on Download, as shown in the following screenshot:
  1. Download the latest Windows package from Jenkins, available at: http://mirrors.jenkins.io/windows/latest.
  2. Click on the package and follow the step-by-step instructions to install it.

Installing Jenkins 2 on CentOS

Let's look at the steps required to install Jenkins on CentOS.

Getting ready

For a business unit, it is advisable to have the following requirements:

  • Java 8
  • 4 GB+ RAM
  • 500 GB+ free disk space

Jenkins requires Java. To install Java, execute:

sudo yum install java

How to do it...

  1. Jenkins' stable and recent versions are available in a YUM repository.
  2. Add the Jenkins repository to the yum repos:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo  
  1. For the stable version, execute:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo  
  1. Import the following key:
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key  
  1. Install Jenkins by executing the following command:
sudo yum install jenkins  

There's more...

  • To start the Jenkins service, execute:
sudo service jenkins start  
  • To stop the Jenkins service, execute:
sudo service jenkins stop  
  • To restart the Jenkins service, execute:
sudo service jenkins restart  

Installing Jenkins 2 on Azure

Microsoft Azure is one of the most popular cloud service providers in recent times. Let's try to install Jenkins on Azure.

Getting ready

You need to have a Microsoft Azure subscription for Jenkins installation on Azure. A free trial for one month is also available:

  1. Go to https://jenkins.io.</span>
  2. Click on Download.

How to do it...

Let's see how to install Jenkins on Azure:

  1. Click on the Deploy to Azure link on the Jenkins download page:
  1. It will redirect you to Azure Marketplace.
  2. Verify the Pricing plans and categories involved in it on the same page.
  3. Click on GET IT NOW. These steps are demonstrated in the following screenshot:
  1. In the Create this app in Azure tab, click on Continue:
  1. If you already have the Azure subscription, then login with the username and password.
  2. Deployment model is already selected.
  3. Click on Create:
  1. Provide Password, Jenkins release type, and Subscription details, as demonstrated in this next screenshot:
  1. Select Create new and provide Resource group name.
  2. Select the Location as per your preference.
  3. Click on OK:
  1. Select the Size based on the requirement.
  2. Provide a unique Domain name label.
  3. Click OK:
  1. Review the selection.
  2. Automated validation will be executed based on your selection.
  3. Click on OK:
  1. Review the Template link available before clicking on the Purchase button:
  1. Once ready, click on Purchase:
  1. In the Azure portal, click on the Resource groups you have created. Review the resources that are being created one by one. Review the deployments in the Overview section.
  1. Click on the JenkinsIP and visit the domain name associated with it:
  1. Download PuTTY or any other ssh client so we can connect to the URL mentioned in the Jenkins page.
  2. Go to the location where putty.exe is available.
  3. Execute the command given on the Jenkins page in command prompt.
  1. Select Yes in PuTTY Security Alert:
  1. Open the browser and navigate to the URL, http://localhost:8080.
  2. It will ask for the Administrator password:
  1. In the PuTTY window, execute the cat command to get details of the file mentioned for the Administrator password.
  2. Replace that password in the Administrator password box and click on Continue:
  1. Click on Install suggested plugins:
  1. Once all plugins are installed successfully, Create First Admin User. Click Save and Finish, as demonstrated in this next screenshot:
  1. Now, the Jenkins setup is completed. Click on Start using Jenkins:
  1. Finally, we are at the dashboard screen:

How it works...

Behind the scene, the template creates all the resources that are required to host Jenkins, including virtual network, network security group, virtual machine, and so on, based on the best practices; and then Jenkins is installed and configured in a secured environment in Microsoft Azure.

Installing Jenkins as a Service in Windows

Installing Jenkins as a Windows service allows you to start Jenkins as soon as the machine starts, and regardless of who is interactively using Jenkins.

Getting ready

Install and configure Jenkins on Windows.

How to do it...

Follow these steps to install Jenkins as a service in Windows:

  1. Go to the Jenkins dashboard.
  2. Click on Manage Jenkins.
  3. Click on Install as Windows Service, as shown in the following diagram:
  1. Keep Installation Directory as the default and click on Install:
  1. Once Windows as a Service installation is successfully completed, click on Yes:
  1. Now Jenkins will be available as a service in the Windows system.

How it works...

Go to Control Panel and search for Services.

Click on Services (Local) to view:

Once the Jenkins service is available, you can right-click on it and start, stop, or restart services based on your requirements.

Installing plugins in Jenkins

Jenkins is an open source automation server that is widely used and extensible due to more than 400+ plugins. Plugins make Jenkins' integration with other tools very easy. You can create your own plugins also.

Getting ready

There are various categories of plugins available, such as Source Code Management, Slave launchers and controllers, Build triggers, Build tools, Build notifies, Build reports, Other Post-build Actions, External site/tool integrations, UI plugins, Authentication and user management, Android development, iOS development, .NET development, Ruby development, Library plugins, and so on.

How to do it...

  1. Go to the Jenkins dashboard. Click on Manage Jenkins and then Manage Plugins:
  1. Go to Available tab and select any plugin to install. Click on Install without restart:
  1. Verify the successful plugin installation, as demonstrated in this next screenshot:

If installation is pending with restart, then restart Jenkins.

How it works...

Once the plugin is installed, a specific block is added in a build job or in the relevant section in Manage Jenkins.

You only need to provide some parameters and credentials for integration of external tools or services with Jenkins.

There's more...

Jenkins defines interfaces or abstract classes that model a facet of a build system. Interfaces or abstract classes define agreement on what needs to be implemented; and Jenkins uses plugins to extend those implementations.

See also

Uploading plugins in Jenkins

There will be instances where you have all the plugins downloaded from https://updates.jenkins-ci.org/download/plugins/, or you may create your own plugin and you want to utilize that in Jenkins. This recipe will explain how to upload these plugins in Jenkins.

Getting ready

How to do it...

For this recipe, we will download a plugin and upload it from the Jenkins dashboard:

  1. Download the copyartifact/ plugin (.hpi) file:
  1. Download the latest version to your system:
  1. Go to the Jenkins dashboard.
  2. Click on Manage Jenkins.
  3. Click on Manage plugins.
  4. Go to the Advanced tab. Click on Choose File in the Upload Plugin section:
  1. Click on Upload.

How it works...

Once a plugin is uploaded successfully, we can utilize extensibility provided by the plugin that is uploaded into Jenkins.

Configuring proxy in Jenkins

Jenkins is often installed in organizations behind the proxy server. In such scenarios, it is important to configure a proxy in the Jenkins dashboard so plugin updates can be installed successfully.

Getting ready

Get all the details related to the server name, port number, and credentials that are allowed to access the proxy server.

How to do it...

  1. Go to the Jenkins dashboard.
  2. Click on Manage Jenkins.
  3. Click on Manage plugins.
  4. Go to the Advanced tab.
  5. Provide Server, Port, User name, Password, and No Proxy Host:
  1. Click on Submit.

Configuring global settings in Jenkins

Configure system is the place where initial settings can be done, and it is useful. You can configure SMTP server details, SonarQube server details, environment variables, and so on.

Getting ready

To configure global settings and paths, we need to go to Configure System in the Jenkins dashboard.

How to do it...

  1. Go to the Jenkins dashboard.
  2. Click on Manage Jenkins.
  3. Click on Configure System.
  4. Verify the Home directory available:
  1. In the Configure System page, we can define Environment variables too so that it can be used during the execution of build jobs.
  2. For example, we can configure the ANDROID SDK path in Environment variables in order to set Continuous Integration for Android Apps.
  1. Another important configuration available on the same page is Jenkins Location. You can specify the HTTP address of the Jenkins installation, as Jenkins cannot reliably detect such a Jenkins URL from within itself:

There's more...

There are some important configurations that you need to do here in the Configure System section, such as SCM Polling, E-mail Notification, Extended E-mail Notification, Git plugin, Disk usage, Quality Gates - SonarQube, Build Pipeline Plugin, Copyartifact: Upstream build that triggered this job, Audit Trail, SonarQube servers, and so on.

Configuring JENKINS_HOME

The .jenkins is the main directory that contains all the details for Jenkins installation files, configurations, plugins, build job configuration, and so on.

Getting ready

It is important to keep the .jenkins directory at a location where a good amount of free space is available. By default, Jenkins creates .jenkins (or JENKINS_HOME) at a specific location considering the operating systems.

For example, in Windows it is available at C:\Users\<USER_NAME>\.jenkins.

How to do it...

  1. In Windows, to change to JENKINS_HOME, go to the Control Panel | All Control Panel Items | System.
  2. Click on Advanced System Settings.
  3. Click on Environment Variables.
  4. Create a new variable JENKINS_HOME and give the path:
  1. In Ubuntu, go to /etc/default/Jenkins.
  2. Change the JENKINS_HOME location:
  1. Once changes are done, save the changes.

How it works...

Once JENKINS_HOME is changed, you need to restart Jenkins. The next time Jenkins starts, it will take JENKINS_HOME as the location that you have configured.

There's more...

The following table describes the default location of JENKINS_HOME in different operating systems:

Operating system

$JENKINS_HOME location

Windows

C:\Program Files (x86)\jenkins

or C:\Users\<USER>\.jenkins

Mac OSX

Macintosh HD/Users/Shared/Jenkins

Ubuntu/Debian

/var/lib/jenkins

Red Hat/CentOS/Fedora

/var/lib/jenkins

OpenSUSE

/var/lib/jenkins

FreeBSD

/usr/local/etc/jenkins

OpenBSD

/usr/local/etc/jenkins

Understanding JENKINS_HOME directory

In this recipe, we will discuss the directories available in the JENKINS_HOME directory.

Getting ready

Locate the JENKINS_HOME directory from the Environment Variables, or go to the default locations where JENKINS_HOME is available in different operating systems.

How to do it...

  1. You have many files and directories in the JENKINS_HOME directory. We will give brief information on some important files and directories:
  1. The following are some important files and directories in the JENKINS_HOME directory:

config.xml

Jenkins root configuration file

fingerprints

It stores fingerprint records, if any

plugins

It is a root directory for all Jenkins plugins

jobs

It is a root directory for all Jenkins jobs

logs

It stores all log files

secrets

It is a root directory for the secret + key for credential decryption

users

It stores all user-related details in Jenkins

war

It stores all details related to the JENKINS_WAR file

workspace

It stores all the files and artifacts related to different build jobs, and it moves content to jobs directory when archiving elements.

See also

In the JENKINS_HOME directory, open config.xml in any of the text editors and review the options available in the file.

Using different ports for Jenkins

By default, Jenkins runs on port number 8080.

Getting ready

There are scenarios where Tomcat is running on 8080, or any other application is running on 8080 port. In such cases, to avoid port conflicts you need to change the Jenkins port.

How to do it...

Let's change a port on which Jenkins runs:

  1. If you run Jenkins using the command line, then you can execute a command such as java -jar -httpPort=9999 jenkins.war to change the existing port from 8080 to 9999.
  2. Another way to change the port while Jenkins is installed using the Windows package is as follows:
    • Go to the Program Files/Jenkins directory where you installed Jenkins
    • Open the Jenkins.xml in the editor
    • Find "--httpPort=8080" and replace the port 8080 with the new port number

How it works...

First, you installed a virtual image of Ubuntu, changed the password so that it is harder for others to log in, and updated the guest OS for security patches.

Configuring JAVA_HOME in Jenkins

Jenkins is an open source automation server that can be used to configure Continuous Integration for projects written in many programming languages. Let's consider the case of an application that is Java-based.

We need to tell Jenkins where Java is installed.

Getting ready

Download the required Java version based on the requirements of an application, or install automatically.

How to do it...

  1. Open the Jenkins dashboard.
  2. Go to Manage Jenkins.
  3. Go to Global Tool Configuration to configure tools, their locations, and automatic installers.
  4. Go to the JDK section.
  5. Give the Name and tick the Install automatically option; provide details for the Oracle account to download JDK successfully.
  6. You can give a logical name such as JDK 1.7 or JDK 1.8 to identify the correct version while configuring a build job.
  7. You can add multiple JDKs based on the version, so if different applications require different JDKs then the scenario can be managed easily by adding JDK in Jenkins:

How it works...

When you create a build job in Jenkins and configure it, you need to specify the Java version that will be used by the build execution. You can use existing Java available on the system as well if you don't want to install automatically.

In the general section of the build job, we can select a JDK from the list. This list contains all the JDKs that we have configured in the Global Tool Configuration.

Configuring Git in Jenkins

Jenkins can be integrated with many source code repositories, and Git is one of them. Let's consider the case of an application that is Java-based and the source code is stored in Git, Gitlab, and/or GitHub.

We need to tell Jenkins where Git is installed in the local system.

Getting ready

Download the required Git version based on the operating system, or install automatically.

How to do it...

  1. Open the Jenkins dashboard.
  2. Go to Manage Jenkins.
  3. Go to Global Tool Configuration to configure the tools, their locations, and automatic installers.
  4. Go to the Git section.
  5. Give the Name and click on Install Automatically, or provide a path to Git.
  6. You can add multiple Gits based on the version or for the specific agent. You need to give a meaningful name so it can be identified easily while configuring the build job:

How it works...

When you create a build job in Jenkins and configure it, you need to specify the Git version that will be used by the build execution. You can use existing Git installation available on the system as well if you don't want to install automatically.

In the Source Code Management section, select the appropriate Git that is configured in Global Tool Configuration from the list.

Go to the Git executable configuration to change the Git installable.

Configuring ANT_HOME in Jenkins

Jenkins is an open source automation server that can be using to configure Continuous Integration for projects written in many programming languages. Let's consider the case of an application that is Java-based, and which has Ant as a build tool.

We need to tell Jenkins where the Ant installable directory is available.

Getting ready

Download the required Ant version or install automatically.

How to do it...

  1. Open the Jenkins dashboard.
  2. Go to Manage Jenkins.
  3. Go to Global Tool Configuration to configure the tools, their locations, and automatic installers.
  4. Go to the Ant section.
  5. Give the Name and click on Install Automatically, or give the path to an existing location where the Ant installation is available.
  6. You can give a logical name such as ANT 1.10.1 or ANT 1.9.1 to identify the correct version while configuring a build job.
  7. You can add multiple Ants based on the version in Jenkins:

How it works...

When you create a build job in Jenkins and configure it, you need to specify the Ant version that will be used by the build execution. You can use existing Ant installation available on the system as well if you don't want to install automatically.

Configuring MAVEN_HOME in Jenkins

Jenkins is an open source automation server that can be using to configure Continuous Integration for rojects written in many programming languages. Let's consider the case of an application that is Java-based and, which has Maven as a build tool.

We need to tell Jenkins where the Maven installable directory is available.

Getting ready

Download the required Maven version or install automatically.

How to do it...

  1. Open the Jenkins dashboard.
  2. Go to Manage Jenkins.
  3. Go to Global Tool Configuration to configure the tools, their locations, and automatic installers.
  4. Go to the Maven section.
  5. Give the Name and click on Install Automatically, or give the path to the existing location where the Maven installation is available.
  6. You can give a logical name such as Maven 3.5.0 or Maven 3.4.0 to identify the correct version while configuring a build job:
  1. You can add multiple Mavens based on the version in Jenkins.

How it works...

When you create a build job in Jenkins and configure it, you need to specify the Maven version that will be used by the build execution. You can use existing Maven installation available on the system as well if you don't want to install automatically.

Configuring GRADLE_HOME in Jenkins

Jenkins is an open source automation server that can be using to configure Continuous Integration for projects written in many programming languages. Let's consider the case of an application that is Android-based, and which has Gradle as a build tool.

We need to tell Jenkins where the Gradle installable directory is available.

Getting ready

Download the required Gradle version or install automatically.

How to do it...

  1. Open the Jenkins dashboard.
  2. Go to Manage Jenkins.
  3. Go to Global Tool Configuration to configure the tools, their locations, and automatic installers.
  4. Go to the Gradle section.
  5. Give the Name and click on Install Automatically,
    or give the path to the existing location where the Gradle installation is available.
  6. You can give a logical name such as Gradle 4.0.1 or Gradle 4.0.0 to identify the correct version while configuring a build job:
  1. You can add multiple Gradles based on the version in Jenkins.

How it works...

When you create a build job in Jenkins and configure it, you need to specify the Gradle version that will be used by the build execution. You can use existing Gradle installation available on the system as well if you don't want to install automatically.

Creating a Freestyle job for Ant Project

A build job is a basic execution unit in Jenkins. We can perform many actions using build jobs. We can execute commands, send notifications, configure Continuous Integration, and so on.

Getting ready

You will need to configure tools based on the application, such as Ant, Gradle, Java, Git, and so on.

How to do it...

  1. Open the Jenkins dashboard.
  2. Click on New Item.
  3. Enter an item name.
  4. Select a template Freestyle project.
  5. Click on OK:
  1. Go to the Source Code Management section and select Git.
  2. Provide the Repository URL.
  3. Provide Credentials, as demonstrated in the next screenshot:
  1. In the Build section, click on the Add build step and select Invoke Ant.
  2. Select the Ant name based on our Global Tool Configuration.
  3. Provide Targets. In Ant, we can give a target based on the targets defined in the build.xml file:
  1. Click on Save.

How it works...

When you go to the Build Job page and click on Build now, it will execute the build based on the configuration.

Creating a Maven Job for Maven Project

A build job is a basic execution unit in Jenkins. We can perform many actions using build jobs. We can execute commands, send notifications, configure Continuous Integration, and so on.

Getting ready

You will need to configure the tools based on the application, such as Maven, Java, Git, and so on.

How to do it...

  1. Open the Jenkins dashboard.
  2. Click on New Item.
  3. Enter an item name.
  4. Select a template Maven project.
  1. Click on OK:
  1. Go to the Source Code Management section and select Git.
  2. Provide the Repository URL.
  3. Provide Credentials.
  4. In the Build section, the Root POM name will be already available.
  5. Maven has its own set of goals and we can execute any one of those goals based on requirements. These steps are demonstrated in this next screenshot:
  1. Click on Save.

How it works...

When you go to the Build Job page and click on Build now, it will execute the build based on the configuration.

Left arrow icon Right arrow icon

Key benefits

  • Explore the use of more than 40 best-of-breed plug-ins for improving efficiency
  • Secure and maintain Jenkins 2.x by integrating it with LDAP and CAS, which is a Single Sign-on solution
  • Efficiently build advanced pipelines with pipeline as code, thus increasing your team's productivity

Description

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.

Who is this book for?

If you are a Java developer, a software architect, a technical project manager, a build manager, or a development or QA engineer, then this book is ideal for you. A basic understanding of the software development life cycle and Java development is needed, as well as a rudimentary understanding of Jenkins.

What you will learn

  • Install and Configure Jenkins 2.x on AWS and Azure
  • Explore effective ways to manage and monitor Jenkins 2.x
  • Secure Jenkins 2.x using Matrix-based Security
  • Deploying a WAR file from Jenkins 2.x to Azure App Services and AWS Beanstalk
  • Automate deployment of application on AWS and Azure PaaS
  • Continuous Testing – Unit Test Execution, Functional Testing and Load Testing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 30, 2017
Length: 438 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788297943
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 30, 2017
Length: 438 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788297943
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 115.97
Learning Continuous Integration with Jenkins
€36.99
Jenkins 2.x Continuous Integration Cookbook
€41.99
Continuous Delivery with Docker and Jenkins
€36.99
Total 115.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Getting Started with Jenkins Chevron down icon Chevron up icon
Management and Monitoring of Jenkins Chevron down icon Chevron up icon
Managing Security Chevron down icon Chevron up icon
Improving Code Quality Chevron down icon Chevron up icon
Building Applications in Jenkins Chevron down icon Chevron up icon
Continuous Delivery Chevron down icon Chevron up icon
Continuous Testing Chevron down icon Chevron up icon
Orchestration Chevron down icon Chevron up icon
Jenkins UI Customization Chevron down icon Chevron up icon
Processes that Improve Quality Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(2 Ratings)
5 star 0%
4 star 50%
3 star 0%
2 star 50%
1 star 0%
PA Nov 19, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good Book for beginners and User management is covered in detail for Authentication.
Amazon Verified review Amazon
Jurijs Kolomijecs Feb 21, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Although this book contains lots of recipes for Jenkins, there is not much information:* First of all, there are extremely lots of screenshots. Too much! Each and every click is followed by a screenshot, resulting in several pages how to create a Freestyle project.* Secondly, build log. C'mon, why would reader wants to read 3 pages of build log!?* There is no hardcore at all. No recipe I can easily find in web.* The last thing I was upset with: half of material is how to setup environment, for example LDAP server. There are like 10-15 pages about LDAP installation and setup in order to show 2-3 screenshots how to configure Jenkins to use LDAP plugin.I cannot recommend this book to anybody who wants to learn Jenkins.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.