Friday, September 2, 2011

Jenkins script for mass-update of email recipients


This is a handy Jenkins Groovy script that can be used to update all the mail recipients for your Maven projects.  If you have a ton of projects, this can be way-faster than changing them each by hand.  I'm putting this here for the Googling and my own notes.

import hudson.plugins.emailext.*
import hudson.model.*
import hudson.maven.*
import hudson.maven.reporters.*
import hudson.tasks.*


// For each project
for(item in Hudson.instance.items) {
  println("JOB : "+item.name);
  for( reporter in item.reporters) {
    if(reporter instanceof MavenMailer) {
      reporter.recipients = "new@email"
    }
  }
}

Sunday, January 23, 2011

Music of 2010

Melanie's post has inspired / shamed me into posting my own Music of 2010 review. I say shame because, well, I'll let the music do the talking:
  1. Kylie Minogue - Get Outta My Way - 9/3/2010 - 67 - 0.47
  2. P!nk - So What - 9/24/2010 - 52 - 0.43
  3. Superchunk - Learned to Surf - 9/24/2010 - 51 - 0.42
  4. Robyn - Hang With Me - 9/24/2010 - 47 - 0.39
  5. Drake, Kanye West, Lil Wayne & Eminem - Forever - 9/15/2010 - 47 - 0.36
  6. The Hold Steady - Hurricane J - 5/15/2010 - 93 - 0.37
  7. Yolanda Be Cool & Dcup - We No Speak Americano - 10/20/2010 - 28 - 0.29
  8. Lil Wayne - A Milli - 9/15/2010 - 38 - 0.29
  9. Taylor Swift - Love Story - 3/16/2010 - 98 - 0.31
  10. Macklemore - The Town - 8/24/2010 - 42 - 0.27
  11. The Lonely Forest - Live There - 8/20/2010 - 43 - 0.27
  12. Passion Pit - Little Secrets - 10/13/2010 - 25 - 0.24
  13. The Cinematic Orchestra - To Build a Home - 10/3/2010 - 27 - 0.24
  14. Aloe Blacc - Take Me Back - 9/3/2010 - 35 - 0.25
  15. Daft Punk - Da Funk - 8/24/2010 - 37 - 0.24
  16. Fitz & The Tantrums - Dear Mr. President - 8/24/2010 - 36 - 0.24
  17. Ke$ha - Blah Blah Blah (feat. 3OH!3) - 3/21/2010 - 77 - 0.25
  18. Balmorhea - Settler - 9/3/2010 - 32 - 0.23
  19. Ryan Adams - Come Pick Me Up - 8/26/2010 - 33 - 0.22
  20. James Brown - I Got the Feelin' - 9/2/2010 - 29 - 0.20
Because I'm a nerd, this is super complicated. Each entry includes the artist, song name, date added to my library (all 2010), total play count, and average number of plays per day. The songs are sorted by the average number of plays per day. I went this route because I thought raw play count gave too much weight to songs I had added earlier in the year. However, I'm not totally happy with this new system either, as I tend to listen to song A LOT when I first get them so they tend to be peaky and then taper off. Maybe if iTunes every kept an exact record of each song I played, I could go back and make things REALLY complicated, but until then.

Also, by not just going by raw play count, I avoided having to put Taylor Swift at the top of my list. However, it's not clear that Kylie Minogue or P!nk is much better. But who am I to deny my pop tendencies?