Skip to content
Permalink
Browse files

[JENKINS-46206] Added a test case.

  • Loading branch information
uhafner committed Aug 18, 2017
1 parent 476d119 commit 6f23ea20e172e79881e080296a72a970d8cf2550
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/test/java/plugins/AbstractAnalysisTest.java
@@ -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();

0 comments on commit 6f23ea2

Please sign in to comment.
You can’t perform that action at this time.