##Preview
Simple Dashing widget (and associated job) to display teamcity build info. Based on DefactoSoftware/dashing-widgets/teamcity.
This widgets displays all children of a teamcity project. Each child project displays the latest build in each branch that is registered in teamcity.
If a build has the state FAILURE
the widgets flashes in red (see gif).
##Dependencies
Add it to dashing's gemfile:
gem 'teamcity-ruby-client'
and run bundle install
. Everything should work now :)
##Usage
- Copy the
team_city.coffee
,team_city.html
andteam_city.scss
files from this gist to thewidgets/team_city
. - Copy
teamcity.rb
tojobs/
- Copy
teamcity.yml
toconfig/
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="3">
<div data-id="template-data-id1" data-image="/project-icon.png" data-view="TeamCity" data-unordered="true" data-title="TITLE"></div>
</li>
##Settings
Modify the teamcity.yml
config file to work in your teamcity setup. See https://github.com/jperry/teamcity-ruby-client for more information on the teamcity api auth.
Hey, great work. I'm having some trouble getting the projects to display correctly. I have several projects with nested projects but looks like although it is picking up the configuration when it parses it fails and it results in just showing a particular project regardless of whether it's in the config. Noticed when the job runs it produces an error:
scheduler caught exception:
undefined method
each' for nil:NilClass E:/Ruby/Ruby21-x64/dashmon/jobs/teamcity.rb:7:in
update_builds'E:/Ruby/Ruby21-x64/dashmon/jobs/teamcity.rb:63:in
block (2 levels) in <top (required)>' E:/Ruby/Ruby21-x64/dashmon/jobs/teamcity.rb:62:in
each'E:/Ruby/Ruby21-x64/dashmon/jobs/teamcity.rb:62:in
block in <top (required)>' E:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in
call'E:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/
jobs.rb:230:in
trigger_block' E:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in
block in trigger'E:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in
call' E:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in
block in trigger_job'The error is in line:
TeamCity.project(:id => project_id).projects.project.each do |project|
Seems like it's not parsing the results from TeamCity gem correctly and getting confused.
Any suggestions?