Triggering an action on failure.#849

Subscribe to Triggering an action on failure. 4 post(s), 2 voice(s)

 
Avatar markm 7 post(s) #2264

It would be great if we could trigger an event or run a job should a certain job or fail.

This could be as simple as a RESTful call to a web server or it could be as complex as running a rake or nant task on one of our agents.

We need to integrate Cruise into an Andon system that alerts developers when tests fail or when a commit breaks the build process.

 
Avatar Jez Humble Administrator 108 post(s) #2293

Thanks Mark

We have been mulling over how to do notifications—but we wanted to see what use cases people had. What would be your preferred mechanism?

Jez.

 
Avatar markm 7 post(s) #2304

I was thinking something like this:

  • create a <success> tag and a <failure> tag that can also contain tasks like exec, rake and ant.
  • each job should have the option of containing the tags.
  • upon success or failure the tasks should run.
  • ideally, we would be able to access a variable with the “modified by” user so that we can use that variable in the rake, ant or exec tasks.
  • if you were really feeling generous you could create a new tag type call <request> that could do http posts, gets, deletes, etc. For example <request type="get" url="dev.server.local/brokethebuild/?project=cruise&user={modified_by_user}" /> The new tag could be one of the options for tasks in the success or failure blocks.

Really though, just being able to rake or exec something on failure would get us by for now. We just need to be able to notify the team when things break or fail.

 
Avatar Jez Humble Administrator 108 post(s) #2340

Thanks for your feedback Mark.