This is extended version of Dashing widget to display a Jenkins build status and build progress.
The widget is based on the original Jenkins Build widget. It supports multiple Jenkins servers. Also, when build is not BUILDING the progress gauge isn't shown, instead build title is bigger. Also, fixed problem when build progress was shown with negative number.
Put the files jenkins_build.coffee
, jenkins_build.html
and jenkins_build.scss
goes in the /widget/jenkins_build
directory and the jenkins_build.rb
in the /jobs
directory
Otherwise you can install this plugin typing:
dashing install GIST_ID
Change the job_mapping
to specify your Jenkins projects, servers and authentication information, eg.:
job_mapping = {
'job1' => { :job => 'Job Name 1', :jenkins => {'url' => URI.parse("http://localhost:8080"), 'auth_name' => nil 'auth_password' => nil }},
'job2' => { :job => 'Job Name 2', :pre_job => 'Job Name 3', :jenkins => {'url' => URI.parse("http://neighbour:8080"), 'auth_name' => 'user' 'auth_password' => 'psw' }}
}
Put the following in your dashing board file to show the status:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="job1" data-view="JenkinsBuild" data-title="Build title" data-description="A little description of build" data-min="0" data-max="100"></div>
</li>
Multiple jobs can add in dashboard repeating the snippet and changing data-id
in accord with job name specified in job_mapping
. Widget support title and description via data attributes, this attributest can be omitted if you do not like to display this information.
Hi,
I have successfully installed but only one jenkins instance is connected. I am getting exception for other jenkins instance.
could you please help me.
scheduler caught exception:
execution expired
/root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:880:in
initialize' /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:880:in
open'/root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:880:in
block in connect' /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/timeout.rb:101:in
timeout'/root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:878:in
connect' /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:863:in
do_start'/root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:852:in
start' /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/net/http.rb:1398:in
request'/var/www/dashing/jenkins/jobs/jenkins_build.rb:37:in
get_json_for_job' /var/www/dashing/jenkins/jobs/jenkins_build.rb:45:in
block (2 levels) in <top (required)>'/root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in
trigger_block' /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in
block in trigger'/root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
Regards,
Ram