public void addStepError(String error, Throwable exception) { getLogger().error(error, exception); this.inspector.getJobStatus().addStepError(this.name, error + " Original msg: " + exception.getMessage()); }
public void addStepError(String error) { getLogger().error(error); this.inspector.getJobStatus().addStepError(this.name, error); }
@Override public void consumeLine(String s) { super.consumeLine(s); this.getLogger().debug(s); if (s.contains("[ERROR]")) { this.inspector.getJobStatus().addStepError(name, s); } } }
@Override public void consumeLine(String s) { super.consumeLine(s); this.getLogger().error(s); this.inspector.getJobStatus().addStepError(name, s); } }
@Override public void run() { InvocationRequest request = new DefaultInvocationRequest(); request.setPomFile(new File(this.mavenHelper.getPomFile())); request.setGoals(Arrays.asList(this.mavenHelper.getGoal())); request.setProperties(this.mavenHelper.getProperties()); request.setBatchMode(true); Invoker invoker = new DefaultInvoker(); if (this.mavenHelper.getErrorHandler() != null) { invoker.setErrorHandler(this.mavenHelper.getErrorHandler()); } invoker.setOutputHandler(this.mavenHelper.getOutputHandler()); try { InvocationResult result = invoker.execute(request); this.exitCode = result.getExitCode(); } catch (MavenInvocationException e) { this.logger.error("Error while executing goal " + this.mavenHelper.getGoal() + " on the following pom file: " + this.mavenHelper.getPomFile() + ". Properties: " + this.mavenHelper.getProperties()); this.logger.debug(e.getMessage()); this.mavenHelper.getInspector().getJobStatus().addStepError(this.mavenHelper.getName(), e.getMessage()); this.exitCode = MavenHelper.MAVEN_ERROR; } }
public void run() { if (this.getBuildToBeInspected().getStatus() != ScannedBuildStatus.PASSING_AND_PASSING_WITH_TEST_CHANGES) { AbstractStep cloneRepo = new CloneRepository(this); cloneRepo .addNextStep(new CheckoutBuggyBuild(this, true)) .addNextStep(new BuildProject(this)) .addNextStep(new ComputePlugins(this, false)) .addNextStep(new Checkstyle(this)); super.setFinalStep(new ComputeSourceDir(this, false, true)); super.getFinalStep(). addNextStep(new WritePropertyFile(this)). addNextStep(new CommitProcessEnd(this)). addNextStep(new PushProcessEnd(this)); cloneRepo.setDataSerializer(this.getSerializers()); cloneRepo.setNotifiers(this.getNotifiers()); this.printPipeline(); try { cloneRepo.execute(); } catch (Exception e) { this.getJobStatus().addStepError("Unknown", e.getMessage()); this.logger.error("Exception catch while executing steps: ", e); } } else { this.logger.debug("Build " + this.getBuggyBuild().getId() + " is not a failing build."); } }
cloneRepo.execute(); } catch (Exception e) { this.getJobStatus().addStepError("Unknown", e.getMessage()); this.logger.debug("Exception catch while executing steps: ", e);
cloneRepo.execute(); } catch (Exception e) { this.jobStatus.addStepError("Unknown", e.getMessage()); this.logger.error("Exception catch while executing steps: ", e); this.jobStatus.setFatalError(e);