Saturday, April 19, 2014

Configuring Visual Studio Online for Siren of Shame

As of Siren of Shame 2.2.0 we now support Visual Studio Online (previously Team Foundation Services).

You will need to configure Visual Studio Online to enable authentication from Siren of Shame.  To do this:

1. Log in to Visual Studio Online
2. Edit your Profile



3. Click Credentials and select "Enable alternate credentials"



4. Enter a username and password
5. When you add a server in Siren of Shame the URL should be https://[myproject]/visualstudio.com/, and the username/password should be what you entered in alternate authentication credentials


Sunday, January 5, 2014

My CI Gets Localized

We recently talked with a Siren of Shame user who proudly announced that Siren of Shame was the second app they installed on their new smartphone.  Naturally we asked: "So what did you think?" to which they sheepishly responded "Um, it installed".

The problem was that the Siren of Shame app (Android in this case, but all the apps work the same way) showed global leader boards and global news.  The user could see the state of their builds, and the push notifications were nice, but they wanted localized gamification data.  They wanted to know their reputation within their team and to see news relevant to their project rather than competing with a bunch of people they didn't know.

Today we are proud to announce two new features for My CI customers that help make data more localized and relevant.

My CI News Feed


First, My CI customers now get news on their My CI page.  In fact, the page should look nearly identical to the Siren of Shame desktop app itself. The My CI page used to look like this:


And now the My CI page looks like this:


Better?  We think so, but feel free to respond in the comments.

Localized Mobile Apps


The second feature we want to announce is that effective immediately all mobile apps including Android, iPhone, Windows Phone, and Windows 8 now will show localized news and leader boards if you're signed up for My CI.  For instance here is the iPhone news feed, complete with check-in comments aggregated across build definitions:



The Leaders page looks similar in that only those individuals listed above will be shown.

Summary


We hope you enjoy the new localized data.  Please post in the comments if you feel we're headed in the right direction (or not) because there is more great stuff to come along these lines in 2014 (hint: it's called Team CI and it's nearly ready).

Saturday, June 29, 2013

How to Add Support for a new CI Server to Siren of Shame

Siren of Shame supports eight CI servers today, but adding additional ones is pretty easy.  Read on if you you're interested in adding support for achievements, reputation, or push notifications to mobile devices to your favorite CI server.

Architecture Overview

We use a plugin model to interact with CI server's via the Managed Extensibility Framework (MEF).  The main project (SirenOfShame.csproj) looks in the \plugins directory to find class libraries (.dll's) that export classes (via MEF's ExportAttribute) that inherit from ICiEntryPoint.  Theoretically you could export multiple CiEntryPoints per assembly, but we only do one per C# project to separate concerns.

If you'd like to start with a reference project for either reading through or copying, consider checking out HudsonServices.csproj as it is one of our more mature plugins.

ICiEntryPoint

public interface ICiEntryPoint
{
   
ConfigureServerBase CreateConfigurationWindow(
        SirenOfShameSettings settings,
       
CiEntryPointSetting ciEntryPointSetting
        );

    string Name { get; }

    string DisplayName { get; }

    WatcherBase GetWatcher(SirenOfShameSettings settings);

}

 

The ICiEntryPoint interface requires a Name and DisplayName.  Name (e.g. "Hudson") is used extensively in a user's persisted settings as an ID.  It is never displayed to a user, and should never be changed.

DisplayName (e.g. "Hudson/Jenkins") is displayed in the dropdown of available CI servers in the Add CI Server dialog and may be changed over time if necessary.

SirenOfShame calls ICiEntryPoint's CreateConfigurationWindow() when a user adds an instance of a new build definition to watch.  It should return a class that inherits from ConfigureServerBase, which in turn inherits from UserControl.  The control will be embedded in a windows forms page when a user selects the associated CI server on the add CI server dialog or goes to edit an existing CI server.  This form should be used to allow a user to connect to a CI server, select the build definitions to watch, and optionally persist a username and password.  For example:

public ConfigureServerBase CreateConfigurationWindow(
   
SirenOfShameSettings settings,
   
CiEntryPointSetting ciEntryPointSetting) {


   
return new ConfigureHudson(settings, this, ciEntryPointSetting);

}

Finally, GetWatcher() is called when the system starts watching CI servers (e.g. after adding a CI server, or on startup).  Its job is to instantiate and return a class that inherits from WatcherBase whose job is to handle polling for build status changes.  For example:

public WatcherBase GetWatcher(SirenOfShameSettings settings) {

    return new HudsonWatcher(settings, this);

}

WatcherBase 

Pretty must the only responsibility of WatcherBase that's important is overriding:

protected override IList<BuildStatus> GetBuildStatus();

This method is called very frequently by the rules engine (RulesEngine.cs) to check for build status changes.  It is is expected to retrieve the build definitions that the user is watching and return a BuildStatus for each one.  It could utilize a separate class, such as one that inherits from ServiceBase, like HudsonService.cs does, but this isn't strictly necessary.

The build engine is run on a background thread, to free up the UI thread, but it does call GetBuildStatus synchronously.  Consequently any long delays inside GetBuildStatus decrease the frequency that users get build statuses.  For example if the user has set the polling interval as 10 seconds and GetBuildStatus takes 10 seconds to run then the user actually gets build statuses every 20 seconds.  For this reason it might be a good idea to request build statuses for each build definition in parallel like HudsonService.cs does:

public IList<HudsonBuildStatus> GetBuildsStatuses(
       
string rootUrl,
       
string userName,
       
string password,
       
BuildDefinitionSetting[] watchedBuildDefinitions) {

    rootUrl = GetRootUrl(rootUrl);

   
var parallelResult = from buildDefinitionSetting in watchedBuildDefinitions
                        
select GetBuildStatus(rootUrl, buildDefinitionSetting, userName, password);
   
return parallelResult.AsParallel().ToList();
}

At any time GetBuildStatus() can throw ServerUnavailableException to indicate that something is temporarily wrong (e.g. the web connection is down or the server is down for maintenance).  In response the main engine will notify the user and continue polling the server periodically until the situation has resolved itself.  If you choose the overload with an exception, the user will be given the opportunity to click on the error message and send the result back to us for diagnosis.

Next Steps

If you have any questions feel free to e-mail us at support at our domain name.  And once you get it working we hope you'll consider initiating a pull request from our GitHub project.

Saturday, June 1, 2013

Released 2.1.1

In the excitement of announcing My CI we forgot to announce what else is new with versions 2.1 and 2.1.1.

Merge Duplicate Users

This oft-requested feature allows you to merge two users that are actually the same person.  Frequently this occurs for those monitoring multiple CI servers.  To perform a merge right-click on the user:



Then select who to merge that user with:


Notice the caveats above.  Specifically the system will not attempt to merge any previous check-ins, reputation, achievements, or stats.  However, the system will merge these going forward.

My CI

Again, as mentioned in our previous post 2.1 enables My CI, where you can get push notifications to mobile phones, a dedicated page on our site with your build information, and e-mails about build status changes and new achievements. 

If you were a beta user of 2.1, then 2.1.1:
  • Sync's users and their reputation, achievements and stats up to My CI
  • Sync's in-progress builds

Other Features

  • Full Screen mode now displays dates as pretty dates (e.g. 5 minutes ago).
  • Improved pretty date calculations

Bugs Fixed

  • The system was excessively updating the tray icon (Issue #16)
  • Full screen mode was displaying dates with incorrect time zone (Issue  #9)
  • Fixed a bug where the Jon Skeet achievement was too easy to get (Issue #42)
  • Fixed various smaller anonymously submitted bugs including null reference exceptions

Thursday, May 30, 2013

Introducing My CI: Turn a Smart Phone Into a Siren of Shame

Today we're proud to release a new, free, service called My CI and in conjunction Siren of Shame 2.1.1 (see also our official 2.1.1 release nodes).

Why?

Continuous integration can be awesome.  It can significantly improve quality on projects.  But incorporating it into daily life for the entire team can be hard.  It ultimately only works if everyone on a team is both aware of the state of the build, and is actively engaged in fixing it when it breaks.

We built My CI to help team leads achieve both ends: generate awareness, while encouraging everyone to fix broken builds; hopefully while making things a little more fun along the way.

What Is It?

My CI is a service that you turn on from our desktop software (2.1.1 or later) to enable some new features. First, it allows anyone to turn a smart phone or tablet into a mini Siren of Shame.  Second, it enables e-mail build notifications with fun user stats and updates about new teammates' achievements.  Finally, it turns on a customized web page we host on our website that displays your team's real time build status, build history, and team member stats like reputation, achievements, CSB, and FSB.

We have a pretty new webpage on our site to describe My CI at a high level here, but read on if you're interested in details.


Turn On My CI

Enabling My CI is easy.  After you pick up the Siren of Shame 2.1.1 desktop software, create an account, open up the SoS Online settings page and turn on My CI like this:


Or, if you use Travis to monitor a Github project you can add the account directly from the My CI page and we'll monitor it for you.  The only downside is we do not yet support achievements and reputation for projects monitored from our server.



Your My CI Page

Once you've enabled My CI you can log onto http://sirenofshame.com/myci and you should see something like the following:




Your builds are on the left with most recent check-in comments, author, and build status.

Notice the team members listed on the right with their baseball card stats including Consecutive Successful Builds (CSB), Fail %, # of Times Fixed Someone else's Build (FSB), Total Builds (T), Reputation, and achievement counts.

We designed this view to be something you could throw up on a projector or put on a dedicated monitor from a machine that isn't running the desktop software.  We hope your team will find the baseball card stats to be motivating and add an element of friendly competition.

If you click on a user you can view individual achievements earned:


If you click on a build from the My CI page you can view build history:



Email Notifications

Typically an e-mail from a build server is bad news.  Wouldn't it be nice if your build failed e-mails contained a silver lining?



Or wouldn't it be nice to occasionally pass on good news to your teammates?



Mobile Sirens of Shame

We saved the best for last.  We now have apps for just about every smartphone and tablet.  We have apps for


Push Notifications

Now when the build breaks we send push notifications to your device(s).  You'll get a modal dialog that pops up with who broke the build and their check-in comments.  In Android you'll get build updates to your notification area.  In Windows 8 and Windows Phone you'll get live tile updates with recent check-in details.



Badges

In iPhone, Windows Phone and Win8 if any of the builds your monitor are broken we'll throw a badge on the Siren of Shame icon to show a count of broken builds without even needing to open the app.


Build Status, Leaders, News

When you open the app you can see all of your builds.  In Android it looks like this.


You can drill down to view recent check-ins.



We also show news from the Siren of Shame leader board like this in iOS:



Or the leaders from the Siren of Shame leaderboard like this in Windows Phone.



Summary
We hope you enjoy this new service.  We've got some big plans for it in the works, so stay tuned in here, on Facebook, or on twitter.  And as always please feel free to add comments we'd love to hear your feedback.

Monday, December 31, 2012

Reputation Algorithm Change

Happy New Year!

To celebrate we just changed the way we calculate reputation.  This will result in a reputation increase for 41 users immediately and will be much nicer going forward.

You used to gain one point for a successful build and lose four points for a failed build.

Sadly there were quite a few users in the negative.  The negative numbers appeared to occur due to high concentrations of failed builds occurring infrequently.  In other words because someone was configuring the CI server.

So rather than adjust number of points for failure we opted to disallow going negative.  Thus if you're doing configuration you can at least have a lower bound.

We recalculated everyone's reputation from the beginning of time.  For example if your reputation was -3 because:

1. You failed a build and lost 4 points = Reputation -4
2. Then you passed a build and gained 1 = Reputation -3

Then effective immediately your reputation will change to 1.  In other words the with the new algorithm it should have been:

1. You failed a build and stayed at zero because you can't go negative = Reputation 0
2. Then you passed a build and gained 1 = Reputaiton 1

Hopefully this will produce a slightly less shameful 2013.  Happy New Year!

Thursday, November 8, 2012

Released 2.0.3

Features

  • Can now sort columns in full screen mode by clicking on the column names (Issue #26)
  • Full screen mode displays on the monitor the app was last in (Issue #19)
  • Can hide users by right-clicking on them (and 'show all' from the menu to unhide)

Bug Fixes

  • Travis wasn't detecting server unavailable correctly
  • An error with one build in Hudson/Jenkins was shutting everything down, errors are now isolated
  • There is now more logging for when build statuses change to help diagnose issues some users are experiencing (Issue #40)
  • Attempted to fix the anonymously submitted "Cannot access a disposed object" bug (again)
  • Hudson/Jenkins wasn't always finding the author of a commit correctly

Acknowledgements

Big shout out to @mightymuke who contributed almost all of the features and bug fixes in this release.