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
Arrow up icon
GO TO TOP
Jenkins 2.x Continuous Integration Cookbook

You're reading from   Jenkins 2.x Continuous Integration Cookbook Over 90 recipes to produce great results using pro-level practices, techniques, and solutions

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788297943
Length 438 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alan Mark Berg Alan Mark Berg
Author Profile Icon Alan Mark Berg
Alan Mark Berg
Mitesh Soni Mitesh Soni
Author Profile Icon Mitesh Soni
Mitesh Soni
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with Jenkins FREE CHAPTER 2. Management and Monitoring of Jenkins 3. Managing Security 4. Improving Code Quality 5. Building Applications in Jenkins 6. Continuous Delivery 7. Continuous Testing 8. Orchestration 9. Jenkins UI Customization 10. Processes that Improve Quality

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.

You have been reading a chapter from
Jenkins 2.x Continuous Integration Cookbook - Third Edition
Published in: Oct 2017
Publisher: Packt
ISBN-13: 9781788297943
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image