Extending Jenkins
eBook - ePub

Extending Jenkins

  1. 152 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Extending Jenkins

About this book

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

About This Book

  • 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

Who This Book Is 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

In Detail

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.

Style and approach

Extending Jenkins explores and explains advanced Jenkins functionality from a practical point of view, teaching you real-world skills that will help you get more from this powerful software. Each key topic is explained clearly with a practical example, and in sufficient detail so you understand the concepts and can then develop your own solutions using your preferred software and languages.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Extending Jenkins


Table of Contents

Extending Jenkins
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Preparatory Steps
Getting started with Jenkins
Extending the basic setup
Jenkins evolution
Continuous Integration with Jenkins
Summary
2. Automating the Jenkins UI
Use case scenario 1 – a large number of jobs
Use case scenario 2 – multiple hosts
Use case scenario 3 – helping your users through UI automation
Use case scenario 4 – UI tweaks
Summary
3. Jenkins and the IDE
Eclipse and Mylyn
Installing Mylyn
Mylyn and Jenkins configurations
IntelliJ IDEA and Jenkins build connectors
NetBeans
Summary
4. The API and the CLI
Creating an Information Radiator with the Jenkins XML API
Getting the information from Jenkins
Automating the job
Radiating the information
Jenkins as a web server – the userContent directory
The Jenkins CLI
How to set it up
How to use it
Triggering remote jobs via the CLI
Updating Jenkins configuration
Summary
5. Extension Points
A brief history of Jenkins plugins
Interfaces
Abstract classes
Abstraction and interfaces
Singletons
Declaring an extension in Jenkins
Summary
6. Developing Your Own Jenkins Plugin
An introduction to Maven
Installing Maven
Summary
7. Extending Jenkins Plugins
Where to start?
Looking at the list of existing plugins
A new build type required
Loading and building our starting point
The Builder class and Stapler
Jelly and Jenkins
Help
Properties files and Messages
The POM file
Plugin progress
Summary
8. Testing and Debugging Jenkins Plugins
Running tests with Maven
Debugging Jenkins
Server debugging – a quick recap
Debugging with IntelliJ
Debugging with Eclipse
mvnDebug
The Jenkins Logger Console
Summary
9. Putting Things Together
The Jenkins script console and Groovy
Groovy and Gradle as alternatives
Jenkins and Docker
Docker in Jenkins
Jenkins in Docker
Jenkins and Android
Jenkins and iOS
Keeping your Jenkins version and plugins up to date
Summary
Index

Extending Jenkins

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2015
Production reference: 1171215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-424-3
www.packtpub.com

Credits

Author
Donald Simpson
Reviewer
Tony Sweets
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Indrajit Das
Content Development Editor
Riddhi Tuljapurkar
Technical Editor
Menza Mathew
Copy Editor
Kausambhi Majumdar
Project Coordinator
Sanchita Mandal
Proofreader
Safis Editing
Indexer
Tejal Daruwale Soni
Graphics
Abhinash Sahu
Production Coordinator
Melwyn Dsa
Cover Work
Melwyn Dsa

About the Author

Donald Simpson is an information technology consultant based in Scotland, UK.
He specializes in helping organizations improve the quality and reduce the cost of software development through the adoption of process automation and Agile methodologies.
Starting out as a Java developer, Donald's interest in application servers, networking, and automation led him to a career as a build engineer. He remains highly technical and hands-on and enjoys learning about new technologies and finding ways to automate and improve manual processes.
He can be reached at www.donaldsimpson.co.uk.

About the Reviewer

Tony Sweets has over 20 years of experience in software development, with most of it in Java and Java-based technologies. Known as the "Tools" guy before there was any concept of DevOps, he also has a passion for setting up and managing hardware and networks. Introduced to Agile development very early on, he has set up and maintained his company's continuous integration system that ranges from Cruise Control to Hudson, and now Jenkins. He is currently a software architect in the payments field and has been working in financial services for over 17 years.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
Support files, eBooks, discount offers, and more
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
2323__perlego__chapter_divider__232...

Table of contents

  1. Extending Jenkins

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Extending Jenkins by Donald Simpson in PDF and/or ePUB format, as well as other popular books in Computer Science & Software Development. We have over one million books available in our catalogue for you to explore.