Skip to content

Commit

Permalink
[JENKINS-46206] Added a test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Aug 18, 2017
1 parent 476d119 commit 6f23ea2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/plugins/AbstractAnalysisTest.java
Expand Up @@ -589,20 +589,20 @@ protected WorkflowJob createPipelineWith(final String fileName, final String ste
* Creates a pipeline that enables the specified {@code stepName}. The first step of the pipeline copies the
* specified resource {@code fileName} as first instruction to the pipeline.
*
* @param fileName the name of the resource that will be copied to the pipeline (this file will be scanned for
* warnings)
* @param stepName the name of the publisher to run (as a pipeline step)
* @param additionalParameters additional parameters for the step (need to start with a comma)
* @param fileName the name of the resource that will be copied to the pipeline (this file will be scanned for
* warnings)
* @param stepName the name of the publisher to run (as a pipeline step)
* @return the created pipeline
*/
protected WorkflowJob createPipelineWith(final String fileName, final String stepName,
final String additionalParameters) {
WorkflowJob job = jenkins.jobs.create(WorkflowJob.class);
String script = "node {\n"
+ job.copyResourceStep(fileName)
+ " step([$class: '" + stepName
+ "', pattern: '**/" + FilenameUtils.getName(fileName)
+ "'])\n" +
+ " step([$class: '" + stepName + "'"
+ ", pattern: '**/" + FilenameUtils.getName(fileName) + "'"
+ additionalParameters
+ "])\n" +
"}";
job.script.set(script);
job.sandbox.check();
Expand Down

0 comments on commit 6f23ea2

Please sign in to comment.