Skip to content
Permalink
Browse files

[JENKINS-27208] A variable has been renamed to reduce the changes (diff)

  • Loading branch information
recena committed Oct 5, 2015
1 parent b1a2956 commit 4fcb6fb40efcb7694d4b4944b1941005cb863611
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/main/java/hudson/plugins/logparser/LogParserPublisher.java
@@ -112,7 +112,7 @@ public boolean perform(final AbstractBuild<?, ?> build, final Launcher launcher,
}

@Override
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws
public void perform(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws
InterruptedException, IOException {

final Logger logger = Logger.getLogger(getClass().getName());
@@ -128,35 +128,35 @@ public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskLi
}
final LogParserParser parser = new LogParserParser(parsingRulesFile, preformattedHtml, launcher.getChannel());
// Parse the build's log according to these rules and get the result
result = parser.parseLog(run);
result = parser.parseLog(build);

// Mark build as failed/unstable if necessary
if (this.failBuildOnError && result.getTotalErrors() > 0) {
run.setResult(Result.FAILURE);
build.setResult(Result.FAILURE);
} else if (this.unstableOnWarning && result.getTotalWarnings() > 0) {
run.setResult(Result.UNSTABLE);
build.setResult(Result.UNSTABLE);
}
} catch (IOException e) {
// Failure to parse should not fail the build - but should be
// handled as a serious error.
// This should catch all process problems during parsing, including
// parser file not found..
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + run, e);
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + build, e);
result.setFailedToParseError(e.toString());
} catch (NullPointerException e) {
// in case the rules path is null
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + run, e);
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + build, e);
result.setFailedToParseError(e.toString());
run.setResult(Result.ABORTED);
build.setResult(Result.ABORTED);
} catch (InterruptedException e) {
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + run, e);
logger.log(Level.SEVERE, LogParserConsts.CANNOT_PARSE + build, e);
result.setFailedToParseError(e.toString());
run.setResult(Result.ABORTED);
build.setResult(Result.ABORTED);
}

// Add an action created with the above results
final LogParserAction action = new LogParserAction(run, result);
run.addAction(action);
final LogParserAction action = new LogParserAction(build, result);
build.addAction(action);
}

@Override

0 comments on commit 4fcb6fb

Please sign in to comment.