Skip to content

Commit afbc021

Browse files
daspilkerunguiculus
authored andcommitted
updated job-dsl-core to 1.75, updated scripts to latest version (#6)
1 parent a735538 commit afbc021

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin: 'groovy'
22

33
ext {
4-
jobDslVersion = '1.68'
5-
jenkinsVersion = '2.73.1'
4+
jobDslVersion = '1.75'
5+
jenkinsVersion = '2.121'
66
}
77

88
sourceSets {
@@ -25,20 +25,27 @@ repositories {
2525

2626
configurations {
2727
testPlugins {}
28+
29+
// see JENKINS-45512
30+
testCompile {
31+
exclude group: 'xalan'
32+
exclude group: 'xerces'
33+
}
2834
}
2935

3036
dependencies {
3137
compile "org.jenkins-ci.plugins:job-dsl-core:${jobDslVersion}"
3238
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
3339

3440
// Jenkins test harness dependencies
35-
testCompile 'org.jenkins-ci.main:jenkins-test-harness:2.27'
41+
testCompile 'org.jenkins-ci.main:jenkins-test-harness:2.33'
3642
testCompile "org.jenkins-ci.main:jenkins-war:${jenkinsVersion}"
3743

3844
// Job DSL plugin including plugin dependencies
3945
testCompile "org.jenkins-ci.plugins:job-dsl:${jobDslVersion}"
4046
testCompile "org.jenkins-ci.plugins:job-dsl:${jobDslVersion}@jar"
41-
testCompile 'org.jenkins-ci.plugins:structs:1.13@jar'
47+
testCompile 'org.jenkins-ci.plugins:structs:1.19@jar'
48+
testCompile 'org.jenkins-ci.plugins:script-security:1.54@jar'
4249

4350
/*
4451
plugins to install in test instance
@@ -75,7 +82,7 @@ dependencies {
7582
testPlugins 'org.jenkins-ci.plugins:email-ext:2.60'
7683
testPlugins 'com.coravy.hudson.plugins.github:github:1.28.0'
7784
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.15'
78-
testPlugins 'org.jenkins-ci.plugins:script-security:1.34'
85+
testPlugins 'org.jenkins-ci.plugins:script-security:1.54'
7986
testPlugins 'io.jenkins.blueocean:blueocean-jwt:1.2.4'
8087
testPlugins 'org.jvnet.hudson.plugins:downstream-buildview:1.9'
8188
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.16'

src/test/groovy/io/unguiculus/jobdsl/JobScriptsSpec.groovy

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package io.unguiculus.jobdsl
22

3-
import groovy.io.FileType
3+
import groovy.util.FileNameFinder
44
import javaposse.jobdsl.dsl.DslScriptLoader
55
import javaposse.jobdsl.dsl.JobManagement
66
import org.junit.ClassRule
77
import org.jvnet.hudson.test.JenkinsRule
88
import spock.lang.Shared
99
import spock.lang.Specification
1010
import spock.lang.Unroll
11+
1112
/**
1213
* Tests that all dsl scripts in the jobs directory will compile.
1314
*/
@@ -28,17 +29,7 @@ class JobScriptsSpec extends Specification {
2829
noExceptionThrown()
2930

3031
where:
31-
file << jobFiles
32-
}
33-
34-
static List<File> getJobFiles() {
35-
List<File> files = []
36-
new File('jobs').eachFileRecurse(FileType.FILES) {
37-
if (it.name.endsWith('.groovy')) {
38-
files << it
39-
}
40-
}
41-
files
32+
file << new FileNameFinder().getFileNames('jobs', '**/*.groovy').collect { new File(it) }
4233
}
4334
}
4435

0 commit comments

Comments
 (0)