-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile.dropwizard
40 lines (39 loc) · 1.66 KB
/
Jenkinsfile.dropwizard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!groovy
pipeline {
agent { node { label 'linux' } }
options {
buildDiscarder logRotator( numToKeepStr: '20' )
}
parameters {
string( defaultValue: '11.0.18', description: 'Jetty version to use to build Dropwizard projects',
name: 'JETTY_VERSION' )
string( defaultValue: 'jdk11', description: 'JDK to use (jdk8,jdk11,jdk14)', name: 'JDK' )
string( defaultValue: 'release/4.0.x', description: 'Dropwizard branch', name: 'DROPWIZARD_BRANCH' )
}
stages {
stage( "Build Dropwizard" ) {
steps {
checkout([$class: 'GitSCM',
branches: [[name: "*/$DROPWIZARD_BRANCH"]],
extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
userRemoteConfigs: [[url: 'https://github.com/dropwizard/dropwizard.git']]])
withEnv(["JAVA_HOME=${ tool "$jdk" }",
"PATH+MAVEN=${ tool "$jdk" }/bin:${tool "maven3"}/bin",
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider(
[configFile(fileId: 'oss-settings-with-staging.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -B -s $GLOBAL_MVN_SETTINGS -V -e clean install -Djetty.version=${JETTY_VERSION} -Dmaven.test.failure.ignore=true -Dmaven.test.redirectTestOutputToFile=true -Dpgpverify.skip=true"
}
}
}
post {
always {
script {
currentBuild.description = "Build Dropwizard branch ${DROPWIZARD_BRANCH}, Jetty Version ${JETTY_VERSION}, jdk ${jdk}"
}
junit testResults: '**/target/surefire-reports/*.xml'
}
}
}
}
}