The Continuous Integration Game plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID ci-game Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.19
Sep 17, 2012
1.398
maven-plugin (version:1.395)
checkstyle (version:3.1, optional)
findbugs (version:4.0, optional)
violations (version:0.5.4, optional)
tasks (version:4.0, optional)
pmd (version:3.1, optional)
warnings (version:3.0, optional)
analysis-core (version:1.0)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Erik Ramfelt (id: redsolo)
Christoph Kutzinski (id: kutzi)
Usage Installations 2013-Apr 2272
2013-May 2244
2013-Jun 2289
2013-Jul 2301
2013-Aug 2226
2013-Sep 2199
2013-Oct 2290
2013-Nov 2239
2013-Dec 2172
2014-Jan 2298
2014-Feb 2269
2014-Mar 2295
This plugin introduces a game where users gets point on improving the builds.The plugin is a simple proof of concept of the Build game that was created by Clint Shank. The idea behind the game is to decrease the number of times a build becomes broken. To win the game the developers have to commit code that is compiling and keep adding unit tests.

Usage

Configuration

Version requirements
Note that the plugin version 1.13+ requires Hudson 1.320 to work and the following plugin versions:
  • Checkstyle 3.1
  • Findbugs 4.0
  • PMD 3.1
  • Tasks 4.0
  • Warnings 3.0
  • Violations 0.5.4
  • analysis-core 1.0

The plugin is not activated for all jobs at start, each separate job has to activate the game. The game can also be de-activated in one job if some large merge activity is going to take place. To activate the game for a job, go to the job configuration page, click "Add post-build action" and select "Continuous integration game" from the list of available post-build actions.

Build score card

For each build the game calculates, according to the rules, the number of points that it is worth. Each user that is responsible for the build (ie comitters) receives the points.

Clicking on the link shows what rules that were involved in the point calculation.

Leader board

To see who is winning the build game, there is a leader board that is shown on the front page.

Rules

The rules of the game are:

  • -10 points for breaking a build
  • 0 points for breaking a build that already was broken
  • +1 points for doing a build with no failures (unstable builds gives no points)
  • -1 points for each new test failures
  • +1 points for each new test that passes

Rules that depend on other plugins:

  • PMD Plugin. Adding/removing a HIGH priority warning = -5/+5. Adding/removing a MEDIUM priority warning = -3/+3. Adding/removing a LOW priority warning = -1/+1.
  • Task Scanner Plugin. Adding/removing a HIGH priority task = -5/+5. Adding/removing a MEDIUM priority task = -3/+3. Adding/removing a LOW priority task = -1/+1
  • Violations Plugin. Adding/removing a violation = -1/+1. Adding/removing a duplication violation = -5/+5.
  • FindBugs Plugin. Adding/removing a HIGH priority findbugs warning = -5/+5. Adding/removing a MEDIUM priority findbugs warning = -3/+3. Adding/removing a LOW priority findbugs warning = -1/+1
  • Warnings Plugin. Adding/removing a compiler warning = -1/+1.
  • Checkstyle Plugin. Adding/removing a checkstyle warning = -1/+1.

Adding rules to the game

Currently there are three ways to add rules to the game.

Patch

Send me a patch for the rule implementation, and I can include it in the main game plugin.

Including rules in another plugin

You are a maintainer of a plugin and would like to add rules to the game with data from your plugin. To do this you should declare the game plugin as an optional dependency to your plugin. To create rules implement the interface Rule, and group them together in a RuleSet. To add a RuleSet to the game, add it to the game's RuleBook.

hudson.plugins.cigame.PluginImpl.GAME_PUBLISHER_DESCRIPTOR.getRuleBook().addRuleSet(pluginruleset);

If there are already rules for your plugin in the game plugin, let me know so they can be removed from the plugin.

Include rules in a third plugin

You would like to add rules to the game that are only valid for your organization and do not want to share them. To do this you should declare the game plugin as a mandatory dependency to your plugin. Then implement the Rule and add them to the RuleBook as in above point.

Changelog

Version 1.19 (2012-09-17)

  • Prevent XSS in user name (issue #14309)
  • authenticated users can modify their own scores (issue #3575)
  • CI game fails with NPE (issue #11041)
  • Added support for Markup Formatter in the LeaderBoard for displaying the user's description (pull-2)

Version 1.18 (2011-02-18)

  • added support for incremental Maven builds (not yet implemented for the PMD and the Violations rule)

Version 1.17

  • Added stylecop warnings for the violations plugin JENKINS-4847

Version 1.16

Version 1.15

  • Fixed a bug where a player that exists in several SCM log entries would receive points for each entry. (issue #4470)

Version 1.14

Version 1.13 Requires Hudson 1.320 or later

  • Fixed so no points are awarded for a build if previous build reports has an error. (issue #4391)
  • Hopefully fixed the NPE in the Violations plugin. (issue #3726)
  • Added feature to handle user names case insensitive. (issue #3990)
  • Fixed 404 when clicking on Leaderboard in any view but the main view (issue #3604)
  • Added localisation support. So if you want help out, please check the Internationalization page. (issue #3484)

Version 1.12

  • Added a description column in the leader board (issue #4141)
  • Fixed most rules so the person who fixes a broken build doesnt get any penalties or rewards for it. The person will still get the points for fixing the build. (issue #2592)

Version 1.11

  • Fixed so points are added or subtracted for test cases when run in a maven job (issue #2542)

Version 1.7

  • Fixed NoSuchMethod exception when using newer versions of Warnings and Checkstyle plugins (issue #2169, issue #2218)

Version 1.6

  • Points are no longer awarded for violations and checkstyle 'fixes' when the is build is broken (issue #1884)

Version 1.5

  • Warnings, FindBugs, PMD, Open tasks, Checkstyle rules no longer throws exception when it is used for the first time (issue #1810)
  • Anonymous users no longer see the "Reset scores" link next to the leader board (issue #1837)

Version 1.4

  • Added option to exclude users from the game (issue #1608)
  • Added option for Administrators to change the score of each user (issue #1608)
  • Now it is possible for Administrators (or everyone if no there is no security) to reset all scores (issue #1754)

Version 1.3

  • Using Violations plugin 0.6.0 no longer throws an exception (issue #1755)

Version 1.2 Requires Hudson 1.211 or later

  • Fixed that points are given for each added/failed unit test (issue #1721)
  • Added rules for the PMD Plugin. Adding/removing a HIGH priority warning = -5/+5. Adding/removing a MEDIUM priority warning = -3/+3. Adding/removing a LOW priority warning = -1/+1.
  • Added rules for the Task Scanner Plugin. Adding/removing a HIGH priority task = -5/+5. Adding/removing a MEDIUM priority task = -3/+3. Adding/removing a LOW priority task = -1/+1
  • Added rules for the Violations Plugin. Adding/removing a violation = -1/+1. Adding/removing a duplication violation = +5/-5.
  • Added rules for the FindBugs Plugin. Adding/removing a HIGH priority findbugs warning = -5/+5. Adding/removing a MEDIUM priority findbugs warning = -3/+3. Adding/removing a LOW priority findbugs warning = -1/+1 (issue #1743)
  • Warnings Plugin. Adding/removing a compiler warning = -1/+1.
  • Checkstyle Plugin. Adding/removing a checkstyle warning = -1/+1.

Version 1.1

  • Fixed that no points are given out when a build goes from failed to unstable

Version 1.0

  • Initial version with hard coded rules

Labels

Edit
plugin-misc plugin-misc Delete
plugin-maven plugin-maven Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment