Search in sources :

Example 36 with WorkflowJob

use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.

the class AnalysisCollectorPluginTest method createPipeline.

@Override
protected WorkflowJob createPipeline() {
    WorkflowJob job = jenkins.jobs.create(WorkflowJob.class);
    job.script.set("node {\n" + copyFileToWorkspace(job, "findbugs.xml") + "  step([$class: 'FindBugsPublisher', pattern: '**/findbugs.xml'])\n" + copyFileToWorkspace(job, "pmd.xml") + "  step([$class: 'PmdPublisher'])\n" + copyFileToWorkspace(job, "checkstyle-result.xml") + "  step([$class: 'CheckStylePublisher'])\n" + copyFileToWorkspace(job, "Tasks.java") + copyFileToWorkspace(job, "Tasks2.java") + "  step([$class: 'TasksPublisher', high: 'PRIO1', normal: 'PRIO2,TODO', low :'PRIO3'])\n" + copyFileToWorkspace(job, "warnings.txt") + "  step([$class: 'WarningsPublisher', " + "     parserConfigurations: [" + "             [parserName: 'Java Compiler (javac)', pattern: '**/warnings.txt']," + "             [parserName: 'JavaDoc Tool', pattern: '**/warnings.txt']," + "             [parserName: 'MSBuild', pattern: '**/warnings.txt']" + "     ]])\n" + "  step([$class: 'AnalysisPublisher'])\n}");
    job.sandbox.check();
    job.save();
    return job;
}
Also used : WorkflowJob(org.jenkinsci.test.acceptance.po.WorkflowJob)

Aggregations

WorkflowJob (org.jenkinsci.test.acceptance.po.WorkflowJob)36 Test (org.junit.Test)24 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)21 Build (org.jenkinsci.test.acceptance.po.Build)19 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)14 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)8 StageView (org.jenkinsci.test.acceptance.plugins.stageview.StageView)8 Matchers.containsString (org.hamcrest.Matchers.containsString)4 WithDocker (org.jenkinsci.test.acceptance.junit.WithDocker)4 Issue (org.jvnet.hudson.test.Issue)4 WithCredentials (org.jenkinsci.test.acceptance.junit.WithCredentials)3 DumbSlave (org.jenkinsci.test.acceptance.po.DumbSlave)3 Category (org.junit.experimental.categories.Category)3 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 Ignore (org.junit.Ignore)2 File (java.io.File)1 IOException (java.io.IOException)1 Pattern (java.util.regex.Pattern)1 StringContains.containsString (org.hamcrest.core.StringContains.containsString)1 LocalController (org.jenkinsci.test.acceptance.controller.LocalController)1