Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-46206] Added a test case.
- Loading branch information
Showing
with
7 additions
and
7 deletions.
-
+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(); |
|
|