Jetty 9.4.x not skipping tests failure and fix jaas test (#5255)
* remove -Dmaven.test.failure.ignore=true Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * get JAASLdapLoginServiceTest working Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * increase memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * use only single thread to have more readable log in Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * disable java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * test only java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * increase memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try -T3 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * restore jdk11/14 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try more memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * archive logs from Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * archive logs from Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * more memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * skip jacoco Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * test useManifestOnlyJar true Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * junit Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * useManifestOnlyJar false Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * debug maven surefire Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * very simple build to debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try not using withMaven Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no debug surefire M4 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * all jdk and M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * enable jacoco only for java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * reduce memory usage for test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * avoid duplications of warnings parsing Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix my bad Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
parent
892a715bea
commit
26d50c8e29
|
@ -12,7 +12,8 @@ pipeline {
|
|||
steps {
|
||||
container('jetty-build') {
|
||||
timeout( time: 120, unit: 'MINUTES' ) {
|
||||
mavenBuild( "jdk8", "-T3 clean install", "maven3", true )
|
||||
mavenBuild( "jdk8", "clean install -T3", "maven3",
|
||||
[[parserName: 'Maven'], [parserName: 'Java']])
|
||||
// Collect up the jacoco execution results (only on main build)
|
||||
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
||||
exclusionPattern: '' +
|
||||
|
@ -31,8 +32,6 @@ pipeline {
|
|||
execPattern: '**/target/jacoco.exec',
|
||||
classPattern: '**/target/classes',
|
||||
sourcePattern: '**/src/main/java'
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,9 +42,8 @@ pipeline {
|
|||
steps {
|
||||
container( 'jetty-build' ) {
|
||||
timeout( time: 120, unit: 'MINUTES' ) {
|
||||
mavenBuild( "jdk11", "-T3 clean install", "maven3", true )
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
|
||||
mavenBuild( "jdk11", "clean install -T3 -Djacoco.skip=true ", "maven3",
|
||||
[[parserName: 'Maven'], [parserName: 'Java']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,9 +54,8 @@ pipeline {
|
|||
steps {
|
||||
container( 'jetty-build' ) {
|
||||
timeout( time: 120, unit: 'MINUTES' ) {
|
||||
mavenBuild( "jdk14", "-T3 clean install", "maven3", true )
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
|
||||
mavenBuild( "jdk14", "clean install -T3 -Djacoco.skip=true ", "maven3",
|
||||
[[parserName: 'Maven'], [parserName: 'Java']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +68,7 @@ pipeline {
|
|||
timeout( time: 40, unit: 'MINUTES' ) {
|
||||
mavenBuild( "jdk11",
|
||||
"install javadoc:javadoc javadoc:aggregate-jar -DskipTests -Dpmd.skip=true -Dcheckstyle.skip=true",
|
||||
"maven3", true )
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']]
|
||||
"maven3", [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +79,8 @@ pipeline {
|
|||
steps {
|
||||
container( 'jetty-build' ) {
|
||||
timeout( time: 30, unit: 'MINUTES' ) {
|
||||
mavenBuild( "jdk8", "-T3 -Pcompact3 clean install -DskipTests", "maven3", true )
|
||||
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
||||
mavenBuild( "jdk8", "-T3 -Pcompact3 clean install -DskipTests", "maven3",
|
||||
[[parserName: 'Maven'], [parserName: 'Java']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,19 +130,23 @@ def slackNotif() {
|
|||
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
|
||||
* @return the Jenkinsfile step representing a maven build
|
||||
*/
|
||||
def mavenBuild(jdk, cmdline, mvnName, junitPublishDisabled) {
|
||||
def localRepo = ".repository"
|
||||
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
||||
|
||||
withMaven(
|
||||
maven: mvnName,
|
||||
jdk: "$jdk",
|
||||
publisherStrategy: 'EXPLICIT',
|
||||
options: [junitPublisher(disabled: junitPublishDisabled),mavenLinkerPublisher(disabled: false),pipelineGraphPublisher(disabled: false)],
|
||||
mavenOpts: mavenOpts,
|
||||
mavenLocalRepo: localRepo) {
|
||||
// Some common Maven command line + provided command line
|
||||
sh "mvn -Premote-session-tests -Pci -V -B -e -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
|
||||
def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
|
||||
script {
|
||||
try {
|
||||
withEnv(["JAVA_HOME=${ tool "$jdk" }",
|
||||
"PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "$mvnName"}/bin",
|
||||
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
|
||||
sh "mvn -Dmaven.repo.local=.repository -Premote-session-tests -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
|
||||
//archiveArtifacts artifacts: '**/jetty-webapp/target/**'
|
||||
if(consoleParsers!=null){
|
||||
warnings consoleParsers: consoleParsers
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,5 +100,13 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</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>
|
||||
</project>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -663,7 +663,7 @@
|
|||
<configuration>
|
||||
<rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
|
||||
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
|
||||
<argLine>@{argLine} -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx2g -Xms2g -XX:+PrintGCDetails</argLine>
|
||||
<argLine>@{argLine} -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx6g -Xms2g -XX:+PrintGCDetails</argLine>
|
||||
<failIfNoTests>false</failIfNoTests>
|
||||
<forkCount>1</forkCount>
|
||||
<reuseForks>true</reuseForks> <!-- to work around crash at https://github.com/junit-team/junit5/issues/801 -->
|
||||
|
|
Loading…
Reference in New Issue