Book Image

Jenkins Continuous Integration Cookbook

By : Alan Mark Berg
Book Image

Jenkins Continuous Integration Cookbook

By: Alan Mark Berg

Overview of this book

<p>Jenkins is a highly popular continuous integration server. Its correct use supports a quality software development process. Jenkins is great at finding issues in software early and communicating it to a wide audience. Jenkins is also easily extendable with a simple framework for writing plugins. Currently there are over 400 plugins available for inclusion.<br /><br /><em>Jenkins Continuous Integration Cookbook</em> has over 80 recipes describing practical ways to use Jenkins and expanding its feature set by selective use of the best of breed plugins. Jenkins has a simple framework for writing plugins. There are over 400 plugins available. Therefore, it is easy to get lost in possibilities. Using practical recipes, this book will guide you through the complexities. The recipes are bundled into themes including security, maintainability, communication, building software, the valid use of code metrics, testing remotely, and writing your first plugin.<br /><br /><em>Jenkins Continuous Integration Cookbook</em> includes problem solving and how to do recipes for many common and less common tasks. A wide range of topics are covered from integrating, securing, and maintaining Jenkins in your organization to writing your first extension.<br /><br />The book begins with common maintenance tasks followed by securing Jenkins and enabling SSO. Then it explores the relationship between Jenkins builds and the Maven pom.xml. You will then learn ways to effectively communicate with various target audiences (developers, project managers, the public). You will then explore source code metrics with related recipes, and set up and run remote stress and functional tests. The book finally lists a series of 11 interesting plugins with a concluding recipe on how to create your first plugin.<br /><br /><em>Jenkins Continuous Integration Cookbook</em> describes solutions and optimizations to problems commonly found.</p>
Table of Contents (15 chapters)
Jenkins Continuous Integration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Skinning Jenkins with the Simple Theme plugin


This recipe modifies the Jenkins look and feel through the themes plugin.

The Simple Theme plugin is a page decorator; it decorates each page with extra HTML tags. The plugin allows you to upload a stylesheet and JavaScript file. The files are then reachable through a local URL. Each Jenkins page is then decorated with HTML tags that use the URLs to pull in your uploaded files. Although straightforward, when properly crafted, the visual effects are powerful.

Getting ready

Install the themes plugin available at https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin.

How to do it...

  1. Under the Jenkins userContent directory, create a file named my.js, with the following content:

    document.write("<h1 id='test'>Example Location</h1>")
    
  2. Create a my.css file in the Jenkins userContent directory, with the following content:

    @charset "utf-8";
    #test {
      background-image: url(/userContent/camera.png);
    }
    #main-table{
      background-image:...