Attempting to fix jetty-9.2.x build
This commit is contained in:
parent
516d93c488
commit
e7a6a079c7
|
@ -2,12 +2,16 @@
|
|||
|
||||
node {
|
||||
// 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 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
|
||||
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
|
||||
{
|
||||
|
@ -24,10 +28,18 @@ node {
|
|||
stage('Compile') {
|
||||
withEnv(mvnEnv) {
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
notifyBuild("Compile Failure")
|
||||
throw e
|
||||
|
@ -38,10 +50,18 @@ node {
|
|||
stage('Javadoc') {
|
||||
withEnv(mvnEnv) {
|
||||
timeout(time: 15, unit: 'MINUTES') {
|
||||
withmaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
globalMavenSettingsConfig: settingsName,
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
sh "mvn -B javadoc:javadoc"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
notifyBuild("Javadoc Failure")
|
||||
throw e
|
||||
|
@ -52,6 +72,13 @@ node {
|
|||
stage('Test') {
|
||||
withEnv(mvnEnv) {
|
||||
timeout(time: 60, unit: 'MINUTES') {
|
||||
withmaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
globalMavenSettingsConfig: settingsName,
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
// Run test phase / ignore test failures
|
||||
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
||||
// Report failures in the jenkins UI
|
||||
|
@ -90,6 +117,7 @@ node {
|
|||
[parserName: 'JavaC']
|
||||
]])
|
||||
}
|
||||
}
|
||||
if(isUnstable())
|
||||
{
|
||||
notifyBuild("Unstable / Test Errors")
|
||||
|
@ -108,7 +136,7 @@ def isActiveBranch()
|
|||
{
|
||||
def branchName = "${env.BRANCH_NAME}"
|
||||
return ( branchName == "master" ||
|
||||
branchName.startsWith("jetty-") );
|
||||
( branchName.startsWith("jetty-") && branchName.endsWith(".x") ) )
|
||||
}
|
||||
|
||||
// Test if the Jenkins Pipeline or Step has marked the
|
||||
|
|
Loading…
Reference in New Issue