Merge branch 'jetty-9.4.x' into jetty-10.0.x

This commit is contained in:
olivier lamy 2020-09-11 13:15:24 +10:00
commit a2342ac055
2 changed files with 46 additions and 25 deletions

61
Jenkinsfile vendored
View File

@ -14,7 +14,8 @@ pipeline {
steps { steps {
container( 'jetty-build' ) { container( 'jetty-build' ) {
timeout( time: 120, unit: 'MINUTES' ) { timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "-T3 clean install", "maven3", true ) // -Pautobahn mavenBuild( "jdk8", "clean install -T3", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
// Collect up the jacoco execution results (only on main build) // Collect up the jacoco execution results (only on main build)
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class', jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
exclusionPattern: '' + exclusionPattern: '' +
@ -33,20 +34,29 @@ pipeline {
execPattern: '**/target/jacoco.exec', execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes', classPattern: '**/target/classes',
sourcePattern: '**/src/main/java' sourcePattern: '**/src/main/java'
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml,**/target/autobahntestsuite-reports/*.xml'
} }
} }
} }
} }
stage("Build / Test - JDK11") {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "clean install -T3 -Djacoco.skip=true ", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
}
}
}
}
stage("Build / Test - JDK14") { stage("Build / Test - JDK14") {
agent { node { label 'linux' } } agent { node { label 'linux' } }
steps { steps {
container( 'jetty-build' ) { container( 'jetty-build' ) {
timeout( time: 120, unit: 'MINUTES' ) { timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk14", "-T3 clean install", "maven3", true ) mavenBuild( "jdk14", "clean install -T3 -Djacoco.skip=true ", "maven3",
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']] [[parserName: 'Maven'], [parserName: 'Java']])
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
} }
} }
} }
@ -58,9 +68,8 @@ pipeline {
container( 'jetty-build' ) { container( 'jetty-build' ) {
timeout( time: 30, unit: 'MINUTES' ) { timeout( time: 30, unit: 'MINUTES' ) {
mavenBuild( "jdk11", mavenBuild( "jdk11",
"package source:jar javadoc:jar javadoc:aggregate-jar -Peclipse-release -DskipTests -Dpmd.skip=true -Dcheckstyle.skip=true", "install javadoc:javadoc javadoc:aggregate-jar -DskipTests -Dpmd.skip=true -Dcheckstyle.skip=true",
"maven3", true ) "maven3", [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']])
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']]
} }
} }
} }
@ -70,8 +79,8 @@ pipeline {
steps { steps {
container( 'jetty-build' ) { container( 'jetty-build' ) {
timeout( time: 30, unit: 'MINUTES' ) { timeout( time: 30, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "-T3 -Pcompact3 clean install -DskipTests", "maven3", true ) mavenBuild( "jdk8", "-T3 -Pcompact3 clean install -DskipTests", "maven3",
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']] [[parserName: 'Maven'], [parserName: 'Java']])
} }
} }
} }
@ -121,19 +130,23 @@ def slackNotif() {
* @paran mvnName maven installation to use * @paran mvnName maven installation to use
* @return the Jenkinsfile step representing a maven build * @return the Jenkinsfile step representing a maven build
*/ */
def mavenBuild(jdk, cmdline, mvnName, junitPublishDisabled) { def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
def localRepo = ".repository" script {
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true' try {
withEnv(["JAVA_HOME=${ tool "$jdk" }",
withMaven( "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "$mvnName"}/bin",
maven: mvnName, "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
jdk: "$jdk", sh "mvn -Dmaven.repo.local=.repository -Premote-session-tests -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
publisherStrategy: 'EXPLICIT', }
options: [junitPublisher(disabled: junitPublishDisabled), mavenLinkerPublisher(disabled: false), pipelineGraphPublisher(disabled: false)], }
mavenOpts: mavenOpts, finally
mavenLocalRepo: localRepo) { {
// Some common Maven command line + provided command line junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
sh "mvn -Premote-session-tests -Pci -V -B -e -fae -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME //archiveArtifacts artifacts: '**/jetty-webapp/target/**'
if(consoleParsers!=null){
warnings consoleParsers: consoleParsers
}
}
} }
} }

View File

@ -109,5 +109,13 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- because directory server do not have yet junit5 extensions -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>