File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ The content of the following code block must be saved in a file called `src/test
9090The test specification will locate all Job DSL scripts within the ` jobs ` directory and create a test for each file.
9191The test will then run each script file to check the script for problems.
9292
93+ import groovy.util.FileNameFinder
9394 import javaposse.jobdsl.dsl.DslScriptLoader
9495 import javaposse.jobdsl.plugin.JenkinsJobManagement
9596 import org.junit.ClassRule
@@ -119,13 +120,7 @@ The test will then run each script file to check the script for problems.
119120 }
120121
121122 static List<File> getJobFiles() {
122- List<File> files = []
123- new File('jobs').eachFileRecurse {
124- if (it.name.endsWith('.groovy')) {
125- files << it
126- }
127- }
128- files
123+ new FileNameFinder().getFileNames('jobs', '**/*.groovy').collect { new File(it) }
129124 }
130125 }
131126
You can’t perform that action at this time.
0 commit comments