Book Image

Extending Jenkins

By : Donald Simpson
Book Image

Extending Jenkins

By: Donald Simpson

Overview of this book

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.
Table of Contents (16 chapters)
Extending Jenkins
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

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 correct it, rather...