-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile-build-tck-servlet
46 lines (41 loc) · 1.7 KB
/
Jenkinsfile-build-tck-servlet
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
41
42
43
44
45
46
#!groovy
pipeline {
agent { node { label 'linux' } }
options {
buildDiscarder logRotator( numToKeepStr: '30' )
}
parameters {
string( defaultValue: 'tckrefactor', description: 'GIT branch name to build TCK (master/tckrefactor)',
name: 'TCK_BRANCH' )
choice(
description: 'TCK Github org',
name: 'GITHUB_ORG_TCK',
choices: ['jakartaee','olamy']
)
string( defaultValue: 'jdk11', description: 'JDK to use', name: 'JDKBUILD' )
}
stages {
stage("Build/Run TCK") {
steps {
ws('run-tck') {
deleteDir()
checkout([$class: 'GitSCM',
branches: [[name: "*/$TCK_BRANCH"]],
extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
userRemoteConfigs: [[url: 'https://github.com/${GITHUB_ORG_TCK}/platform-tck']]])
timeout(time: 30, unit: 'MINUTES') {
withEnv(["JAVA_HOME=${tool "$JDKBUILD"}",
"PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "maven3"}/bin",
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider([configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -ntp install:install-file -Dfile=./lib/javatest.jar -DgroupId=javatest -DartifactId=javatest -Dversion=5.0 -Dpackaging=jar -N"
sh "mvn -ntp -s $GLOBAL_MVN_SETTINGS -V -B -U -pl :servlet-tck -am clean install -Dmaven.test.failure.ignore=true -e -Pglassfish-ci-managed -T2 -Pglassfish-runner"
junit testResults: '**/surefire-reports/TEST-**.xml'
}
}
}
}
}
}
}
}