2018-08-04 00:08:13 -04:00
|
|
|
#!groovy
|
|
|
|
|
2018-08-16 18:06:40 -04:00
|
|
|
def branch = params.get("JETTY_BRANCH" ,"jetty-9.4.x")
|
|
|
|
def owner = params.get("REPO_OWNER", "eclipse")
|
2019-03-21 07:42:34 -04:00
|
|
|
def jdk = params.get("JDK", "jdk8")
|
2019-03-21 07:38:13 -04:00
|
|
|
def jmhJarPath = params.get("jmhJarPath","jetty-jmh/target/benchmarks.jar")
|
2019-05-23 00:12:44 -04:00
|
|
|
currentBuild.description = "Build branch $branch with jdk $jdk"
|
2018-08-04 00:08:13 -04:00
|
|
|
|
|
|
|
node("linux") {
|
|
|
|
// System Dependent Locations
|
|
|
|
def mvnName = 'maven3.5'
|
|
|
|
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}"
|
|
|
|
def settingsName = 'oss-settings.xml'
|
|
|
|
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
|
|
|
|
|
|
|
|
|
|
|
stage("Checkout") {
|
2018-08-16 18:06:40 -04:00
|
|
|
git url: "https://github.com/$owner/jetty.project.git", branch: "$branch"
|
2019-03-21 07:38:13 -04:00
|
|
|
|
2018-08-04 00:08:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
stage("Compile") {
|
2019-03-21 07:38:13 -04:00
|
|
|
timeout(time: 15, unit: 'MINUTES') {
|
|
|
|
withMaven(
|
|
|
|
maven: mvnName,
|
|
|
|
jdk: jdk,
|
|
|
|
publisherStrategy: 'EXPLICIT',
|
|
|
|
globalMavenSettingsConfig: settingsName,
|
|
|
|
mavenOpts: mavenOpts,
|
|
|
|
mavenLocalRepo: localRepo) {
|
|
|
|
sh "mvn -V -B clean install -DskipTests -T6 -e -pl :jetty-jmh -am"
|
2018-08-04 00:08:13 -04:00
|
|
|
}
|
|
|
|
}
|
2019-03-21 07:38:13 -04:00
|
|
|
stash name: 'perf-tests', includes: jmhJarPath
|
2018-08-04 00:08:13 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// jmh run
|
2019-05-23 00:12:44 -04:00
|
|
|
node( 'jmh-build-node' ) {
|
|
|
|
stage("jmh-run") {
|
2019-03-21 07:38:13 -04:00
|
|
|
timeout( time: 180, unit: 'MINUTES' ) {
|
|
|
|
withEnv( ["JAVA_HOME=${tool "$jdk"}"] ) {
|
2018-08-04 00:08:13 -04:00
|
|
|
unstash name: 'perf-tests'
|
2019-03-21 07:38:13 -04:00
|
|
|
sh "rm -rf jmh_results"
|
|
|
|
sh "mkdir jmh_results"
|
2019-05-23 00:12:44 -04:00
|
|
|
sh "${env.JAVA_HOME}/bin/java -jar $jmhJarPath -rff jmh_results/jmh_result.json -rf json -foe true"
|
2019-03-21 07:38:13 -04:00
|
|
|
jmhReport 'jmh_results/jmh_result.json'
|
2018-08-04 00:08:13 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// vim: et:ts=2:sw=2:ft=groovy
|