Getting Started
Integration
Scoreboard communicates using a simple text based format that is easily read and written by both humans and computers. Example:
Score[
name=Name[boost]
timestamp=TimePoint[1226283366184]
status=Status[
is=WAITING
since=TimePoint[1226230348927]
]
history=History[[Run[
timestamp=TimePoint[1226230348927]
id=Id[157]
result=FAILURE
], Run[
timestamp=TimePoint[1226229928839]
id=Id[156]
result=SUCCESS
], Run[
timestamp=TimePoint[1225260549044]
id=Id[155]
result=SUCCESS
]]]
]
The scoreboard architecture dictates that required information can be obtained in this format via a url specified in the configuration. Scoreboard provides plugins for Hudson and CruiseControl.
Hudson
Hudson integration is now even easier with the supplied scoreboard-hudson.hpi. This plugin is downloadable by itself or is included in the /plugins directory of the scoreboard tar ball.
- Run hudson as per normal.
- Navigate to http://your-hudson-url/ in your browser.
- Hit Manage Hudson.
- Hit Manage Plugins.
- Switch to the Advanced tab.
- Use the Upload Plugin form to install the scoreboard-hudson.hpi file.
- Restart Hudson.
Thats it.
You should now be able to navigate to http://your-hudson-url/score/yourbuildname and see output similar to above.
CruiseControl
The cruise plugin depends on the dashboard application included in version 2.7+.
- Download the jar or extract it from the /plugins directory of the release tar.
- Copy scoreboard-cruise.jar to $CRUISE_HOME/webapps/dashboard/WEB-INF/lib/
- Edit dashboard tab wiring file – $CRUISE_HOME/webapps/dashboard/WEB-INF/tabs/dashboard-tab.xml – to include scoreboard controller:
<bean id="scoreUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/score/*">scoreController</prop>
</props>
</property>
</bean>
<bean id="scoreController" class="leapstream.scoreboard.warts.providers.cruise.hooks.ScoreController" autowire="autodetect" />
- Restart cruise.
You should now be able to navigate to http://your-cruise-url/dashboard/tab/score/yourbuildname and see output similar to above.
Configuration
Scoreboard is configured using an executable scripting language. Any language supported by the Java 6 scripting framework can be used. Rhino JavaScript and BeanShell are embedded by default, any others can be used by just adding them to the classpath. The language is configured by file extensions. There is a sample configuration, supplied with the release, using javascript to configure Scoreboard.
Example config:
1 2 hudson = "http://www.leapstream.com.au/products/scoreboard/samples/hudson/"; 3 cruise = "http://www.leapstream.com.au/products/scoreboard/samples/cruise/"; 4 5 build("hornet", hudson + "hudson-hornet"); 6 build("evil", hudson + "hudson-evil"); 7 build("cruiser", cruise + "cruiser"); 8 status("status", hudson + "hudson-status"); 9 10 image(300000, "http://www.bom.gov.au/radar/IDR662.gif"); 11
Config api provided:
- build(name, url)
- status(name, url)
- image(interval, url)
Execution
Note: Scoreboard requires JDK 6.
Running up Scoreboard is pretty straight forward. Using the scoreboard-all.jar in the root of the release:
1 $ java -jar scoreboard-all.jar file:config.js
Where file:config.js is any valid url pointing to your config file (even remotely).
