Skip to content

Commit 26c2ae7

Browse files
author
R. Tyler Croy
committed
Add a simple-ish Jenkinsfile for building on JDK8 in parallel on Jenkins
1 parent 2cacd12 commit 26c2ae7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Jenkinsfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env groovy
2+
3+
node {
4+
stage 'Checkout source'
5+
checkout scm
6+
7+
stage 'Build and test'
8+
List<String> plugins = ['base', 'war', 'jar']
9+
Map parallelSteps = [:]
10+
11+
for (int i = 0; i < plugins.size(); i++) {
12+
def plugin = "jruby-gradle-${plugins.get(i)}-plugin"
13+
parallelSteps[plugin] = {
14+
node('docker') {
15+
checkout scm
16+
docker.image('java:8-jdk').inside {
17+
timeout(30) {
18+
sh "./gradlew -Si ${plugin}:check ${plugin}:gradleTest ${plugin}:assemble"
19+
}
20+
}
21+
junit 'build/test-results/**/*.xml'
22+
archiveArtifacts artifacts: 'build/libs/*.jar,build/*.zip', fingerprint: true
23+
}
24+
}
25+
}
26+
parallel(parallelSteps)
27+
}

0 commit comments

Comments
 (0)