rax-maas / dreadnot

deploy without dread
Apache License 2.0
631 stars 61 forks source link

Guard against 'null' actions when determining lastBuiltRevision. #51

Closed tildedave closed 11 years ago

tildedave commented 11 years ago

We recently upgraded our Jenkins and started to get null actions returned in the tree like

{
  actions: [
    { },
    { },
    null,
    {
      lastBuiltRevision: {
      SHA1: "0faf4733647f9d0a1c2ebeff72b8b86d72a39e92"
    },
    { },
    { },
    { }
  ],
  building: false,
  fullDisplayName: "Chef #12",
  number: 12,
  result: "SUCCESS",
  timestamp: 1373657574000,
  url: "http://$JENKINS_URL/job/Chef/12/"
}

The 'null' action causes the Jenkins code that determines the lastBuiltRevision to blow up. This patch adds a guard.

jirwin commented 11 years ago

LGTM +1. Thanks!