Skip to content

Instantly share code, notes, and snippets.

@gkspranger
Created January 13, 2017 12:26
Show Gist options
  • Save gkspranger/874486706e3fe06af5d432f1ddf514d5 to your computer and use it in GitHub Desktop.
Save gkspranger/874486706e3fe06af5d432f1ddf514d5 to your computer and use it in GitHub Desktop.
# Commands:
# hal restart tomcat in <environment>
module.exports = (robot) ->
robot.respond /restart tomcat in (dev|stage|prod)/i, (msg) ->
env = msg.match[1]
robot.emit "jenkins_job", {
name: "Restart_Tomcat",
msg: msg,
success: "Hello !! I went ahead and triggered a Tomcat restart for you in #{env}",
failure: "EEEK !!",
params: "Inventory=#{env}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment