Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
$9.99 $29.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
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

Billing Address

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

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 : 9781785284984
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
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

Billing Address

Product Details

Publication date : Dec 28, 2015
Length: 152 pages
Edition : 1st
Language : English
ISBN-13 : 9781785284984
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
Banner background image

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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.