Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When creating a new Listener, the script will default to the below which simply forwards the payload via a REST Post request. This script emulates an outbound webhook in the truest sense since no payload modification or logic is done. Simply update the postUrl variable with your endpoint and its ready to go.

...

Code Block
languagegroovy
//Carry out any custom action you wish for this event. Check out the documentation for reference or ideas.
//Optionally filter out events you dont want to execute by returning false on the filter script tab.
def listenerName = "myListener";
LOG.info("Running listener: ${listenerName}");

def postUrl = "";
def responseCode = REST.forward(postUrl,EVENT);

LOG.setMessage("Message forwarded (${responseCode}) to ${postUrl}");

End Release After Snapshot Deploys to Production

...