Wednesday, 12 August 2015

Do Makeup to your Jenkins Server

   In continuous Integration Process Jenkins plays a major role in terms of providing a very good platform to perform the task. It gives us the basic requirements such as normal UI, Trend chart. However it is always useful to have comprehensive dash boards, trend charts for better tracking purpose and eye catching UI themes that makes difference. We can also change the email configurations such as Subject lines, body content, including the report into the body of the email etc. For every requirement that is mentioned above, jenkins provides us the plugins. We will tweak those plugins and add the changes that we need. 

HTML Publisher
This plugin is handy with built-in copy to master functionality. Imagine that you have some files generated through your builds that are not actual artifacts. Let’s say logs, execution reports. This plugin lets you to copy them to a master and provide an easy HTML file that will have links to these special files of yours for really quick access.
    To configure this follow the below steps:
1. Click on the Configure option for your Jenkins job.
2. In the post build portion, look for the Publish HTML Reports option and select the check box. See the screen shot below


Fill the path to the directory containing the html reports in the "HTML directory to archive" field. Specify the pages to display (default index.html); you can specify multiple comma-separated pages and each will be a tab on the report page. Finally, give a name in the Report Title field, which will be used to provide a link to the report. By default, only the most recent HTML report will be saved, but if you'd like to be able to view HTML reports for each past build, select "Keep past HTML reports."

Some time at HTML directory, you don't have to specify project name, but have to start one level below. For e.g. if your project name is "ABC" and if HTML files are at "ABC/report-output/html" then you have to specify just \test-output\html\.

3. After saving the configuration, run build once. The published HTML reports are available to view from within Jenkins with convenient links in the dashboard.

Green Balls
Historically Jenkins has used the blue color to denote successful builds. So, all status messages throughout the GUI use blue as the color of success. But if you feel that green is the way to go (Green Hornet, Green Lantern, Gumby, traffic lights, etc) then you can change your preference to green with the Green Balls plugin.

Simple Theme Plugin:
This is a plugin for Jenkins that supports custom CSS & JavaScript.
You can customize Jenkins's appearance (ex. his gentle face on the background) as below:

Navigate to Jenkins > Manage Jenkins > Configure System > Theme
Set URL of theme CSS and JS to URLs of your customized CSS and JS

Some example themes are as below:
http://daniilyar.github.io/Jenkins-themes/themes/canon-jenkins/min/styles.css
http://daniilyar.github.io/Jenkins-themes/themes/canon-jenkins/min/script.js

Wall display Plugin:
A wall display that shows job build progress in a way suitable for public wall displays. Rendering is performed using javascript based on REST API calls, so requires no page refreshes.
After installing the plugin you will get a option on the left hand sidebar.To get it display simply click on the 'Wall Display' link in the sidebar of your project.

Email Extension Plugin:
This plugin allows you to configure every aspect of email notifications. You can customize when an email is sent, who should receive it, and what the email says. 


After installing this, go to the job, which has to configured for mail trigger, Click on “configure”. Go to the postbuild actions, click on “Editable Email Notification”. This will have options like the recipent details etc. Select “HTML(text/Content)” for “Content Type” option. under the Default content text area type the below text as it is though it contains html tags.

Hi All,

 Please find the overall Results of this build as below. You can click on http://10.40.60.186:8080/view/MCS/job/LETSCRETSAutomation/HTML_Report/ for more details.


${FILE,path=”test-output/emailable-report.html”}


Bottom of the line in the above script specifies the path. Change it according to your html path. Remember here, if ur html report depends on any resources like images etc, we have configure them accordingly.

https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

Dash Board Plugin:
This plugin contributes a new view implementation that provides a dashboard / portal-like view for Jenkins.
The configuration is done in 2 parts, selecting the Jenkins jobs to include in the view, and selecting which dashboard portlets to have included in the view.  The jobs that you select are used for all the portlets to draw their information from. 

 

No comments:

Post a Comment