Attempting to fix jetty-9.2.x build
This commit is contained in:
parent
516d93c488
commit
e7a6a079c7
|
@ -2,12 +2,16 @@
|
||||||
|
|
||||||
node {
|
node {
|
||||||
// System Dependent Locations
|
// System Dependent Locations
|
||||||
def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation'
|
def mvntool = tool name: 'maven3.5', type: 'hudson.tasks.Maven$MavenInstallation'
|
||||||
def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK'
|
def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK'
|
||||||
|
def mvnName = 'maven3.5'
|
||||||
|
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
|
||||||
|
def settingsName = 'oss-settings.xml'
|
||||||
|
def mavenOpts = '-Xms1g -Xmx4g -XX:MaxPermSize=512m -Djava.awt.headless=true -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2'
|
||||||
|
|
||||||
// Environment
|
// Environment
|
||||||
List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
|
List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
|
||||||
mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Djava.awt.headless=true")
|
mvnEnv.add("MAVEN_OPTS=$mavenOpts")
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -24,10 +28,18 @@ node {
|
||||||
stage('Compile') {
|
stage('Compile') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 15, unit: 'MINUTES') {
|
timeout(time: 15, unit: 'MINUTES') {
|
||||||
|
withmaven(
|
||||||
|
maven: mvnName,
|
||||||
|
jdk: "$jdk",
|
||||||
|
publisherStrategy: 'EXPLICIT',
|
||||||
|
globalMavenSettingsConfig: settingsName,
|
||||||
|
mavenOpts: mavenOpts,
|
||||||
|
mavenLocalRepo: localRepo) {
|
||||||
sh "mvn -B clean install -Dtest=None"
|
sh "mvn -B clean install -Dtest=None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
notifyBuild("Compile Failure")
|
notifyBuild("Compile Failure")
|
||||||
throw e
|
throw e
|
||||||
|
@ -38,10 +50,18 @@ node {
|
||||||
stage('Javadoc') {
|
stage('Javadoc') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 15, unit: 'MINUTES') {
|
timeout(time: 15, unit: 'MINUTES') {
|
||||||
|
withmaven(
|
||||||
|
maven: mvnName,
|
||||||
|
jdk: "$jdk",
|
||||||
|
publisherStrategy: 'EXPLICIT',
|
||||||
|
globalMavenSettingsConfig: settingsName,
|
||||||
|
mavenOpts: mavenOpts,
|
||||||
|
mavenLocalRepo: localRepo) {
|
||||||
sh "mvn -B javadoc:javadoc"
|
sh "mvn -B javadoc:javadoc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
notifyBuild("Javadoc Failure")
|
notifyBuild("Javadoc Failure")
|
||||||
throw e
|
throw e
|
||||||
|
@ -52,10 +72,17 @@ node {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 60, unit: 'MINUTES') {
|
timeout(time: 60, unit: 'MINUTES') {
|
||||||
|
withmaven(
|
||||||
|
maven: mvnName,
|
||||||
|
jdk: "$jdk",
|
||||||
|
publisherStrategy: 'EXPLICIT',
|
||||||
|
globalMavenSettingsConfig: settingsName,
|
||||||
|
mavenOpts: mavenOpts,
|
||||||
|
mavenLocalRepo: localRepo) {
|
||||||
// Run test phase / ignore test failures
|
// Run test phase / ignore test failures
|
||||||
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
||||||
// Report failures in the jenkins UI
|
// Report failures in the jenkins UI
|
||||||
step([$class: 'JUnitResultArchiver',
|
step([$class : 'JUnitResultArchiver',
|
||||||
testResults: '**/target/surefire-reports/TEST-*.xml'])
|
testResults: '**/target/surefire-reports/TEST-*.xml'])
|
||||||
// Collect up the jacoco execution results
|
// Collect up the jacoco execution results
|
||||||
def jacocoExcludes =
|
def jacocoExcludes =
|
||||||
|
@ -90,6 +117,7 @@ node {
|
||||||
[parserName: 'JavaC']
|
[parserName: 'JavaC']
|
||||||
]])
|
]])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(isUnstable())
|
if(isUnstable())
|
||||||
{
|
{
|
||||||
notifyBuild("Unstable / Test Errors")
|
notifyBuild("Unstable / Test Errors")
|
||||||
|
@ -108,7 +136,7 @@ def isActiveBranch()
|
||||||
{
|
{
|
||||||
def branchName = "${env.BRANCH_NAME}"
|
def branchName = "${env.BRANCH_NAME}"
|
||||||
return ( branchName == "master" ||
|
return ( branchName == "master" ||
|
||||||
branchName.startsWith("jetty-") );
|
( branchName.startsWith("jetty-") && branchName.endsWith(".x") ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if the Jenkins Pipeline or Step has marked the
|
// Test if the Jenkins Pipeline or Step has marked the
|
||||||
|
|
Loading…
Reference in New Issue