Skip to content
Permalink
Browse files

Alter output based on the job CC (abend, error, ok) [JENKINS-31837].

  • Loading branch information
candiduslynx committed Oct 17, 2016
1 parent 2233e8f commit c819c806d59a97e89dfed4230947327b409a7b17
Showing with 16 additions and 5 deletions.
  1. +16 −5 src/main/java/org/jenkinsci/plugins/IBM_zOS_Connector/zOSJobSubmitter.java
@@ -178,11 +178,22 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis

// Print the info about the job
logger.info("Job [" + zFTPConnector.getJobID() + "] processing finished.");
listener.getLogger().println(
"Job ["
+ zFTPConnector.getJobID()
+ "] processing finished. Captured RC = ["
+ printableCC + "]");
StringBuilder reportBuilder = new StringBuilder();
reportBuilder.append("Job [");
reportBuilder.append(zFTPConnector.getJobID());
reportBuilder.append("] processing ");
if (!printableCC.matches("\\d+")) {
if (printableCC.startsWith("ABEND")) {
reportBuilder.append("ABnormally ENDed. ABEND code = [");
} else {
reportBuilder.append("failed. Reason: [");
}
} else {
reportBuilder.append("finished. Captured RC = [");
}
reportBuilder.append(printableCC);
reportBuilder.append("]");
listener.getLogger().println(reportBuilder.toString());

// If wait was requested try to save the job log.
if(this.wait) {

0 comments on commit c819c80

Please sign in to comment.
You can’t perform that action at this time.