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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Extending Jenkins
Extending Jenkins

Extending Jenkins: Get a complete walkthrough of the many interfaces available in Jenkins with the help of real-world examples to take you to the next level with Jenkins

eBook
$20.98 $29.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Extending Jenkins

Chapter 2. Automating the Jenkins UI

In this chapter, we will be looking at a selection of different approaches that can be used to alter and enhance the Jenkins user interface (UI).

As with Jenkins as a whole, the Jenkins UI is highly customizable and has been clearly designed from the outset to be adaptable and extendable so that you can tailor and adapt it to fit your particular requirements and environment.

There are different ways in which you can customize the UI, ranging from purely look and feel cosmetic alterations to user input refinements, and then towards the automatic creation of Jenkins jobs and setting up a dynamic Slave Node provisioning system.

The focus and the most suitable approach is usually driven by the way in which Jenkins will be used; focusing on the areas that matter the most in a particular situation is usually where the most benefit is to be gained.

We will examine four of the most common use case scenarios in this chapter and the different ways in which...

Use case scenario 1 – a large number of jobs

A single Jenkins instance can contain many jobs. The practical limit varies widely and depends on multiple factors, such as the following:

  • Hardware resources such as RAM, CPU, disk, and network performance
  • Slave nodes—how many there are, how they are set up, and their performance
  • How well the jobs are distributed across the Master and Slave nodes
  • Settings of individual jobs; their size, function, history, and retention

It's not unusual for a Jenkins instance to have over 1,000 jobs, or around 100 Slave nodes attached to a Master node.

Managing the performance load that this causes is a big task in itself, and Jenkins also needs to manage the presentation and housekeeping of these jobs—your users will not want to look through more than 1,000 jobs just to search for the one they need, and we also need to make sure that old jobs are cleaned up or archived and that new ones can be created both easily and accurately.

If you can...

Use case scenario 2 – multiple hosts

The Jenkins UI can also be tailored to help in managing installations that require a large numbers of Slave hosts. This may be required to improve the performance of builds or test runs by distributing the load to other systems, or wherever Jenkins is used to perform functions spanning a multiple-host Operating System—something that Jenkins can do very easily through the built-in JNLP functionality.

Often, testing requirements dictate that a wide variety of different nodes running varying combinations of OSes and software are essential—this is common when you have an application that needs testing on different versions of Internet Explorer; each version requires a different Windows host, as each host can only support one version of the browser at a time.

Managing multiple and varying Slave Nodes can be problematic; however, the Jenkins UI provides several features that can help to simplify and automate this aspect.

One of the simplest...

Use case scenario 3 – helping your users through UI automation

Customizing and automating the Jenkins user interface can help and empower users of your Jenkins instance to help themselves.

By ensuring that it is possible only for your users to input valid data, we can greatly reduce the risk of invalid input and the resulting issues, which should improve the user experience too.

The most common way to do this is to validate the user input at runtime. For example, if your job prompts the user to enter a day of the week or a build number, you may assign this to a variable called something like $WEEKDAY or $MY_BUILD_NUM respectively.

We can then set up our job to ensure that the supplied user data is valid—if the value of $WEEKDAY is not a valid day of the week, or the user has supplied the build number as Build Two instead of an integer value that we may have been hoping for, we can cause the build to fail with an error message explaining what the user has done wrong and how to...

Use case scenario 4 – UI tweaks

Sometimes Jenkins is set up and then left running in the background doing its thing; it's rarely checked upon or looked at unless things go wrong, and users are happy that things get done.

On other occasions, the Jenkins UI is used heavily by many people at the same time, all of whom will inevitably have their own requirements and priorities, and then the look and feel of Jenkins becomes a high priority.

There are many ways in which you can give the users what they want, including setting up numerous views, each providing a different user or group with a view of the (Jenkins) world that suits them.

Use case scenario 4 – UI tweaks

Using the simple .*job.* regular expression ensures that all jobs (both present and future) that contain the string "job" in their title will be displayed on this view. Again, this really relies on a decent naming convention being followed, but if this is done, it can reduce the maintenance requirements of this aspect to nothing—when a...

Summary

In this chapter, we looked at the ways in which the user interface can be altered to suit your requirements. We looked at a few common issues and reviewed some possible approaches that could be used to alleviate them.

As you have seen, the Jenkins user interface is extremely powerful, and much of this power comes from its flexibility and extensibility.

Adapting the Jenkins user interface to address whatever use case applies to your environment can make a massive difference to the success of your Jenkins installation. At the same time, it also makes the user experience much more positive and can guide your users to interact with Jenkins in a mutually beneficial way. When it's easy for people to find what they want and hard for them to make mistakes (for example, due to runtime validation, dynamically populated forms, and automatically-created suites of jobs), you should have happier users and a more robust and efficient Jenkins too.

The in-built functionality of Jenkins can often...

Left arrow icon Right arrow icon

Key benefits

  • Find out how to interact with Jenkins from within Eclipse, NetBeans, and IntelliJ IDEA
  • Develop custom solutions that act upon Jenkins information in real time
  • A step-by-step, practical guide to help you learn about extension points in existing plugins and how to build your own plugin

Description

Jenkins CI is the leading open source continuous integration server. It is written in Java and has a wealth of plugins to support the building and testing of virtually any project. Jenkins supports multiple Software Configuration Management tools such as Git, Subversion, and Mercurial. This book explores and explains the many extension points and customizations that Jenkins offers its users, and teaches you how to develop your own Jenkins extensions and plugins. First, you will learn how to adapt Jenkins and leverage its abilities to empower DevOps, Continuous Integration, Continuous Deployment, and Agile projects. Next, you will find out how to reduce the cost of modern software development, increase the quality of deliveries, and thereby reduce the time to market. We will also teach you how to create your own custom plugins using Extension points. Finally, we will show you how to combine everything you learned over the course of the book into one real-world scenario.

Who is this book for?

This book is aimed primarily at developers and administrators who are interested in taking their interaction and usage of Jenkins to the next level. The book assumes you have a working knowledge of Jenkins and programming in general, and an interest in learning about the different approaches to customizing and extending Jenkins so it fits your requirements and your environment perfectly.

What you will learn

  • Retrieve and act upon Jenkins information in real time
  • Find out how to interact with Jenkins through a variety of IDEs
  • Develop your own Form and Input validation and customization
  • Explore how Extension points work, and develop your own Jenkins plugin
  • See how to use the Jenkins API and command-line interface
  • Get to know how to remotely update your Jenkins configuration
  • Design and develop your own Information Radiator
  • Discover how Jenkins customization can help improve quality and reduce costs
Estimated delivery fee Deliver to Indonesia

Standard delivery 10 - 13 business days

$12.95

Premium delivery 5 - 8 business days

$45.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 28, 2015
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781785284243
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Indonesia

Standard delivery 10 - 13 business days

$12.95

Premium delivery 5 - 8 business days

$45.95
(Includes tracking information)

Product Details

Publication date : Dec 28, 2015
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781785284243
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 159.97
Learning Continuous Integration with Jenkins
$65.99
Mastering Jenkins
$54.99
Extending Jenkins
$38.99
Total $ 159.97 Stars icon

Table of Contents

10 Chapters
1. Preparatory Steps Chevron down icon Chevron up icon
2. Automating the Jenkins UI Chevron down icon Chevron up icon
3. Jenkins and the IDE Chevron down icon Chevron up icon
4. The API and the CLI Chevron down icon Chevron up icon
5. Extension Points Chevron down icon Chevron up icon
6. Developing Your Own Jenkins Plugin Chevron down icon Chevron up icon
7. Extending Jenkins Plugins Chevron down icon Chevron up icon
8. Testing and Debugging Jenkins Plugins Chevron down icon Chevron up icon
9. Putting Things Together Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(3 Ratings)
5 star 66.7%
4 star 0%
3 star 0%
2 star 0%
1 star 33.3%
Dianne Feb 27, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
i can thoroughly recommend this book; the author really knows his subject inside out, and explains it very clearly.
Amazon Verified review Amazon
Tony Jan 28, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Full Disclosure: I was the technical reviewer for this book. You don’t know what you don’t know and Extending Jenkins will help you figure some of the things you do not know about Jenkins. As an Object Oriented programmer, I did find the title a little misleading because whenever I hear the term “extending”, morphing and reusing objects usually comes to mind. You will find a little of that in this book, however it is more about using Jenkins past (i.e. extending) its normal use case of simply watching a code repository and compiling code. This book will introduce you to new techniques of using and interacting with Jenkins in ways you never thought were possible. I find it interesting to hear how other people have their development environments setup as I’m always trying to improve my own. This book works in the same way. As you read it, you will start imagining how some of these techniques might apply in your own environment. This book is probably not for the beginner Jenkins user, but if you have used Jenkins before or have managed a Jenkins system, then the ideas you gain from Extending Jenkins will be worthwhile.
Amazon Verified review Amazon
Mr A Sep 03, 2016
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I am Java Developer and I was looking for a book that explained the technical workings of Jenkins so that I can develop plugins.This book is titled 'Extending Jenkins' and only a SINGLE chapter was dedicated to this subject. The rest of the book was padded out with introductions of other topics such as Maven, Java abstract classes/interfaces.The single chapter dedicated to extending Jenkins such as Plugin development did not go into enough depth to make it even useful. The author had a single example of creating a custom Builder, no mention of the other core Jenkins components such as Triggers, pre/post build Actions etc...Instead of giving a technical explanation of how he arrived at the Java classes that would be extended, he quoted that it was derived by looking at similar plugins source code.In short this book should have been titled 'Introduction into 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 the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela