use of org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisConfigurator in project acceptance-test-harness by jenkinsci.
the class AnalysisCollectorPluginTest method addAndConfigureTasksPublisher.
private void addAndConfigureTasksPublisher(final FreeStyleJob job) {
TasksFreestyleSettings taskScannerSettings = job.addPublisher(TasksFreestyleSettings.class);
AnalysisConfigurator<TasksFreestyleSettings> configurator = settings -> {
settings.setHighPriorityTags("PRIO1");
settings.setNormalPriorityTags("PRIO2,TODO");
settings.setLowPriorityTags("PRIO3");
};
configurator.accept(taskScannerSettings);
}
use of org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisConfigurator in project acceptance-test-harness by jenkinsci.
the class AnalysisCollectorPluginTest method addAndConfigureWarningsPublisher.
private void addAndConfigureWarningsPublisher(final FreeStyleJob job) {
WarningsBuildSettings warningsSettings = job.addPublisher(WarningsBuildSettings.class);
AnalysisConfigurator<WarningsBuildSettings> warningsConfigurator = settings -> {
settings.addWorkspaceScanner("Java Compiler (javac)", "**/*");
settings.addWorkspaceScanner("JavaDoc Tool", "**/*");
settings.addWorkspaceScanner("MSBuild", "**/*");
};
warningsConfigurator.accept(warningsSettings);
}
use of org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisConfigurator in project acceptance-test-harness by jenkinsci.
the class AnalysisCollectorPluginTest method should_set_build_result_to_unstable.
/**
* Verifies that a build should become status unstable when a warning threshold is exceeded.
*/
@Test
public void should_set_build_result_to_unstable() {
FreeStyleJob job = jenkins.jobs.create();
job.configure();
job.copyResource(ANALYSIS_COLLECTOR_PLUGIN_RESOURCES + "/findbugs.xml");
job.addPublisher(FindBugsFreestyleSettings.class);
AnalysisCollectorSettings analysis = job.addPublisher(AnalysisCollectorSettings.class);
AnalysisConfigurator<AnalysisCollectorSettings> configurator = settings -> settings.setBuildUnstableTotalAll("5");
configurator.accept(analysis);
job.save();
buildUnstableJob(job);
}
Aggregations