ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Programmatically Polling the Build Farm

asked 2014-07-25 11:22:19 -0500

David Lu gravatar image

What is the best way to programmatically get the status of packages on the build farm? Is there an API? The status page does some sneaky javascripting, so scraping the HTML does not work.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-25 12:48:24 -0500

Dirk Thomas gravatar image

The HTML of the debbuild status page is regenerated every 15 minutes. The Javascript is only doing some client-side filtering - no polling of data.

You also don't have to parse the HTML itself. The HTML is generated from the data in the CSV files which are available in the same location: http://www.ros.org/debbuild/

So you can e.g. poll http://www.ros.org/debbuild/indigo.csv to create your own status page / monitoring system.

edit flag offensive delete link more

Comments

This is useful. Two things: 1) The html itself does not seem to contain the different build information. If you read the source HTML, that data is filled in dynamically somewhere. 2) The CSVs do not contain maintainer information, which I imagine can just be crossreferenced with the rosdistro info

David Lu gravatar image David Lu  ( 2014-07-25 13:42:34 -0500 )edit

Yes, the CSV data is cross referenced with information available via rosdistro. If you want to see what is actually done the script generating these files is https://github.com/ros-infrastructure/buildfarm/blob/master/scripts/generate_status_page.py

Dirk Thomas gravatar image Dirk Thomas  ( 2014-07-25 14:01:06 -0500 )edit
1

answered 2014-07-25 11:36:20 -0500

updated 2014-07-25 12:31:55 -0500

Jenkins does appear to have an API.

Edit: There's more info at http://jenkins.ros.org/api/

For example, you can load everything in python as follows:

 builddata = ast.literal_eval(urllib.urlopen('http://jenkins.ros.org/api/python').read())
edit flag offensive delete link more

Comments

Please do NOT poll our Jenkins server programmatically. It would likely result in a much higher load - especially if more people would do that. Otherwise we would need to prevent those kind of queries (and we would actually prefer to work on ROS related stuff rather then "protecting" the infrastructure).

Dirk Thomas gravatar image Dirk Thomas  ( 2014-07-25 12:45:18 -0500 )edit

Good to know. Might be good to disable those APIs to prevent that from happening. If one wanted that data, would it be possible to maybe setup a cron job to periodically generate a static XML/JSON/python file to use?

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2014-07-25 12:49:52 -0500 )edit

We don't want to disable them since we use some of the APIs for certain tasks. If you have specific information in mind which you want to use please describe them and provide the job configuration for performing the task. If it does not cost much resources we can easily add this to the farm.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-07-25 12:52:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-25 11:22:19 -0500

Seen: 223 times

Last updated: Jul 25 '14