Versions Compared

Key

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

...

Expand
titleExample Groovy Code
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 = "endReleaseListener";
LOG.info("Running listener: ${listenerName}");
         
if(EVENT.payload.environment.environmentCode.equals("PROD")){
     LOG.setMessage("Release ${EVENT.payload.release.releaseName} has completed moving throghthrough the pipeline. Ending release.");
     FLEXDEPLOY.endRelease(EVENT.payload.release.releaseId);
}

...