Skip to content

Commit

Permalink
Merge pull request voxpupuli#496 from danielpalstra/puppethelper_erro…
Browse files Browse the repository at this point in the history
…r_handling

Add folder support to puppet_helper
  • Loading branch information
R. Tyler Croy committed Feb 15, 2016
2 parents a26abf2 + 680c0f5 commit 12341f3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions files/puppet_helper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,15 @@ class Actions {
* Print the job's state as either "true" or "false"
*/
void job_enabled(String name) {
def disabled = Jenkins.getInstance().getJob(name).isDisabled()
out.println(!disabled)
}
} // class Actions
try {
def disabled = Jenkins.getInstance().getJob(name).isDisabled()
out.println(!disabled)
}
catch (MissingMethodException me) {
out.println("Found resource is not a job, skipping.")
}
}
} // class Actions

///////////////////////////////////////////////////////////////////////////////
// CLI Argument Processing
Expand Down

0 comments on commit 12341f3

Please sign in to comment.