Extending Jenkins

Key Features

  • Find out the way to have interaction with Jenkins from inside Eclipse, NetBeans, and IntelliJ IDEA
  • Develop customized strategies that act upon Jenkins details in actual time
  • A step by step, sensible advisor that can assist you know about extension issues in latest plugins and the way to construct your individual plugin

Book Description

Jenkins CI is the major open resource non-stop integration server. it's written in Java and has a wealth of plugins to help the construction and trying out of almost any venture. Jenkins helps a number of software program Configuration administration instruments reminiscent of Git, Subversion, and Mercurial.

This publication explores and explains the various extension issues and customizations that Jenkins deals its clients, and teaches you the way to boost your individual Jenkins extensions and plugins.

First, you are going to find out how to adapt Jenkins and leverage its skills to empower DevOps, non-stop Integration, non-stop Deployment, and Agile tasks. subsequent, you will discover out how one can decrease the price of glossy software program improvement, raise the standard of deliveries, and thereby lessen the time to marketplace. we are going to additionally educate you ways to create your personal customized plugins utilizing Extension points.

Finally, we'll assist you mix every little thing you discovered over the process the publication into one real-world scenario.

What you'll learn

  • Retrieve and act upon Jenkins details in genuine time
  • Find out how one can have interaction with Jenkins via a number of IDEs
  • Develop your personal shape and enter validation and customization
  • Explore how Extension issues paintings, and advance your personal Jenkins plugin
  • See tips on how to use the Jenkins API and command-line interface
  • Get to understand easy methods to remotely replace your Jenkins configuration
  • Design and enhance your individual details Radiator
  • Discover how Jenkins customization may help enhance caliber and decrease costs

About the Author

Donald Simpson is a data know-how advisor dependent in Scotland, UK.

He focuses on aiding companies enhance the standard and decrease the price of software program improvement during the adoption of approach automation and Agile methodologies.

Starting out as a Java developer, Donald's curiosity in program servers, networking, and automation led him to a profession as a construct engineer. He is still hugely technical and hands-on and enjoys studying approximately new applied sciences and discovering how one can automate and increase guide processes.

He could be reached at www.donaldsimpson.co.uk.

Table of Contents

  1. Preparatory Steps
  2. Automating the Jenkins UI
  3. Jenkins and the IDE
  4. The API and the CLI
  5. Extension Points
  6. Developing your personal Jenkins Plugin
  7. Extending Jenkins Plugins
  8. Testing and Debugging Jenkins Plugins
  9. Putting issues Together

Show description

Quick preview of Extending Jenkins PDF

Show sample text content

Rather than rolling your personal, you may as a substitute provide to collaborate at the improvement of this new plugin. the outcome of this collaboration is likely to produce a favored and high quality product than builders making a related performance. it is also attainable that you'll discover a overwhelming majority of the performance that you're looking already to be had inside a comparable plugin, and with a bit info and collaboration, you will be capable of leverage this so as to add a brand new function through reusing a lot of the present code.

This supplied hyperlink is from the Jenkins domestic web page: https://wiki. jenkins-ci. org/display/JENKINS/Jenkins+Script+Console It presents an invaluable choice of instance scripts to teach you ways this works in an effort to get you begun. those instance scripts conceal a variety of capabilities and are often desirous about common Jenkins admin and house responsibilities tasks—tasks that this device fits rather well because of its ease of use and adaptability. utilizing this interface, you could quick and simply insert and edit code in an internet web page, run it with the press of a button, and notice quick effects.

We'll disguise the high-level strategies the following with a few commonly used examples as a instruction for the subsequent chapters the place we'll see the right way to enforce those principles for actual. during this bankruptcy, we are going to seriously look into the subsequent layout styles: InterfacesAbstract classesSingletons additionally, we are going to assessment a number of very important layout suggestions: layout by way of contractExtension pointsCreating extensionsAnnotations a short heritage of Jenkins plugins there are literally thousands of plugins on hand for Jenkins, they usually conceal an enormous variety of projects and supply a wealth of priceless assets for the neighborhood that makes use of and works with Jenkins.

To outline or create an extension in Jenkins, we use the @Extension annotation variety. This annotation is picked up by way of Jenkins, and the recent extension can be further to an ExtensionList item, the place the extension can then be stumbled on through ExtensionFinder. extra info at the extension annotation are available the following: http://javadoc. jenkins-ci. org/? hudson/Extension. html. the next instance indicates the assertion for an Animal extension element: /** * Extension element that defines other forms of animals */ public summary classification Animal implements ExtensionPoint { ...

After this aspect, you could adequately hook up with the Jenkins example through pointing your browser to the next: http://127. zero. zero. 1:8080/jenkins/ notice don't try and connect with the 8000 port you've set in MAVEN_OPTS—this is used for debugging, which we'll have a look at later. Use port 8080, and be aware that the appended /jenkins/ course is additionally required for you to attach. Now, we will be able to create and configure a brand new Freestyle task and upload within the related construct step as sooner than via deciding upon to exploit our Say hi global activity and including our identify to it.

Download PDF sample

Rated 4.78 of 5 – based on 43 votes