Я написал плагин, следующий за
http://www.baeldung.com/jenkins-custom-plugin
И он генерирует HTML-отчет
File artifactsDir = build.getArtifactsDir();
String path = artifactsDir.getCanonicalPath() + REPORT_TEMPLATE_PATH;
File reportFile = new File("path");
// write report's text to the report's file
, и для следующей сборки я хочу импортировать этот отчетфайл, чтобы увидеть изменения
Я пробовал это, но ни одно из них не работает
build.getPreviousSuccessfulBuild().getArtifactManager().root() + REPORT_TEMPLATE_PATH
// fail with File not found, but the file is there in bash
build.getPreviousSuccessfulBuild().getArtifactsDir() + REPORT_TEMPLATE_PATH
// null pointer exception, seems to be generated by getArtifactsDir()
build.getPreviousBuild().getArtifactManager().root() + REPORT_TEMPLATE_PATH
Так как я могу получить последний файл отчета об успешной сборке в текущей сборке?