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,7 +28,15 @@ node {
|
||||||
stage('Compile') {
|
stage('Compile') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 15, unit: 'MINUTES') {
|
timeout(time: 15, unit: 'MINUTES') {
|
||||||
sh "mvn -B clean install -Dtest=None"
|
withmaven(
|
||||||
|
maven: mvnName,
|
||||||
|
jdk: "$jdk",
|
||||||
|
publisherStrategy: 'EXPLICIT',
|
||||||
|
globalMavenSettingsConfig: settingsName,
|
||||||
|
mavenOpts: mavenOpts,
|
||||||
|
mavenLocalRepo: localRepo) {
|
||||||
|
sh "mvn -B clean install -Dtest=None"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +50,15 @@ node {
|
||||||
stage('Javadoc') {
|
stage('Javadoc') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 15, unit: 'MINUTES') {
|
timeout(time: 15, unit: 'MINUTES') {
|
||||||
sh "mvn -B javadoc:javadoc"
|
withmaven(
|
||||||
|
maven: mvnName,
|
||||||
|
jdk: "$jdk",
|
||||||
|
publisherStrategy: 'EXPLICIT',
|
||||||
|
globalMavenSettingsConfig: settingsName,
|
||||||
|
mavenOpts: mavenOpts,
|
||||||
|
mavenLocalRepo: localRepo) {
|
||||||
|
sh "mvn -B javadoc:javadoc"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,43 +72,51 @@ node {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
withEnv(mvnEnv) {
|
withEnv(mvnEnv) {
|
||||||
timeout(time: 60, unit: 'MINUTES') {
|
timeout(time: 60, unit: 'MINUTES') {
|
||||||
// Run test phase / ignore test failures
|
withmaven(
|
||||||
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
maven: mvnName,
|
||||||
// Report failures in the jenkins UI
|
jdk: "$jdk",
|
||||||
step([$class: 'JUnitResultArchiver',
|
publisherStrategy: 'EXPLICIT',
|
||||||
testResults: '**/target/surefire-reports/TEST-*.xml'])
|
globalMavenSettingsConfig: settingsName,
|
||||||
// Collect up the jacoco execution results
|
mavenOpts: mavenOpts,
|
||||||
def jacocoExcludes =
|
mavenLocalRepo: localRepo) {
|
||||||
// build tools
|
// Run test phase / ignore test failures
|
||||||
"**/org/eclipse/jetty/ant/**" +
|
sh "mvn -B install -Dmaven.test.failure.ignore=true"
|
||||||
",**/org/eclipse/jetty/maven/**" +
|
// Report failures in the jenkins UI
|
||||||
",**/org/eclipse/jetty/jspc/**" +
|
step([$class : 'JUnitResultArchiver',
|
||||||
// example code / documentation
|
testResults: '**/target/surefire-reports/TEST-*.xml'])
|
||||||
",**/org/eclipse/jetty/embedded/**" +
|
// Collect up the jacoco execution results
|
||||||
",**/org/eclipse/jetty/asyncrest/**" +
|
def jacocoExcludes =
|
||||||
",**/org/eclipse/jetty/demo/**" +
|
// build tools
|
||||||
// special environments / late integrations
|
"**/org/eclipse/jetty/ant/**" +
|
||||||
",**/org/eclipse/jetty/gcloud/**" +
|
",**/org/eclipse/jetty/maven/**" +
|
||||||
",**/org/eclipse/jetty/infinispan/**" +
|
",**/org/eclipse/jetty/jspc/**" +
|
||||||
",**/org/eclipse/jetty/osgi/**" +
|
// example code / documentation
|
||||||
",**/org/eclipse/jetty/spring/**" +
|
",**/org/eclipse/jetty/embedded/**" +
|
||||||
",**/org/eclipse/jetty/http/spi/**" +
|
",**/org/eclipse/jetty/asyncrest/**" +
|
||||||
// test classes
|
",**/org/eclipse/jetty/demo/**" +
|
||||||
",**/org/eclipse/jetty/tests/**" +
|
// special environments / late integrations
|
||||||
",**/org/eclipse/jetty/test/**";
|
",**/org/eclipse/jetty/gcloud/**" +
|
||||||
step([$class: 'JacocoPublisher',
|
",**/org/eclipse/jetty/infinispan/**" +
|
||||||
inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
",**/org/eclipse/jetty/osgi/**" +
|
||||||
exclusionPattern: jacocoExcludes,
|
",**/org/eclipse/jetty/spring/**" +
|
||||||
execPattern: '**/target/jacoco.exec',
|
",**/org/eclipse/jetty/http/spi/**" +
|
||||||
classPattern: '**/target/classes',
|
// test classes
|
||||||
sourcePattern: '**/src/main/java'])
|
",**/org/eclipse/jetty/tests/**" +
|
||||||
// Report on Maven and Javadoc warnings
|
",**/org/eclipse/jetty/test/**";
|
||||||
step([$class: 'WarningsPublisher',
|
step([$class: 'JacocoPublisher',
|
||||||
consoleParsers: [
|
inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
||||||
[parserName: 'Maven'],
|
exclusionPattern: jacocoExcludes,
|
||||||
[parserName: 'JavaDoc'],
|
execPattern: '**/target/jacoco.exec',
|
||||||
[parserName: 'JavaC']
|
classPattern: '**/target/classes',
|
||||||
]])
|
sourcePattern: '**/src/main/java'])
|
||||||
|
// Report on Maven and Javadoc warnings
|
||||||
|
step([$class: 'WarningsPublisher',
|
||||||
|
consoleParsers: [
|
||||||
|
[parserName: 'Maven'],
|
||||||
|
[parserName: 'JavaDoc'],
|
||||||
|
[parserName: 'JavaC']
|
||||||
|
]])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(isUnstable())
|
if(isUnstable())
|
||||||
{
|
{
|
||||||
|
@ -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