diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 66a9094..73289a6 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,6 +23,8 @@ permissions: security-events: read contents: write actions: read + id-token: write + checks: write jobs: build: @@ -37,27 +39,27 @@ jobs: steps: -# - name: Checkout Arquillian -# uses: actions/checkout@v3 -# with: -# repository: 'arquillian/arquillian-container-jetty' -# ref: 'master' -# -# - name: Set up JDK -# uses: actions/setup-java@v3 -# with: -# java-version: 17 -# distribution: 'temurin' -# cache: 'maven' -# -# - name: Build Arquillian with Maven -# run: mvn install -B -U + # - name: Checkout Arquillian + # uses: actions/checkout@v3 + # with: + # repository: 'arquillian/arquillian-container-jetty' + # ref: 'master' + + # - name: Set up JDK + # uses: actions/setup-java@v3 + # with: + # java-version: 17 + # distribution: 'temurin' + # cache: 'maven' + + # - name: Build Arquillian with Maven + # run: mvn install -B -U - name: Checkout Servlet TCK uses: actions/checkout@v3 with: - repository: 'olamy/jakartaee-tck' - ref: 'tckrefactor' + repository: 'jakartaee/servlet' + ref: 'master' - name: Set up JDK uses: actions/setup-java@v3 @@ -66,15 +68,27 @@ jobs: distribution: 'temurin' cache: 'maven' - - name: Install legacy javatest jar - run: mvn -ntp install:install-file -Dfile=./lib/javatest.jar -DgroupId=javatest -DartifactId=javatest -Dversion=5.0 -Dpackaging=jar + - name: Set up Maven + run: + mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper -Dmaven=3.9.5 - name: Build Servlet TCK with Maven - run: mvn -V -B -U -pl :servlet -am clean install -DskipTests -e -B -U + run: ./mvnw -V -B -U clean install -DskipTests -e -B -U - name: Checkout TCK Run uses: actions/checkout@v3 + - name: Set up Maven + run: + mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper -Dmaven=3.9.5 + - name: Build TCK Run with Maven - run: mvn -V -B -U -am clean verify -e -B -Dmaven.test.failure.ignore=true + run: ./mvnw -V -B -U -am clean verify -e -B -Dmaven.test.failure.ignore=true + - name: Publish Test Report + uses: dorny/test-reporter@v1 + with: + name: Tests Report + path: '**/target/surefire-reports/TEST-**.xml' + reporter: java-junit + fail-on-error: false diff --git a/Jenkinsfile b/Jenkinsfile index 6049feb..e461576 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,42 +2,47 @@ pipeline { agent { node { label 'linux' } } - triggers { - upstream(upstreamProjects: 'tck//tck-olamy-github-tck-run-module-glassfish/') //, threshold: hudson.model.Result.SUCCESS) + tools { + maven 'maven3' } +// triggers { +// upstream(upstreamProjects: 'tck/tck-olamy-github-tck-run-module-glassfish') //, threshold: hudson.model.Result.SUCCESS) +// } options { buildDiscarder logRotator( numToKeepStr: '50' ) } parameters { - string( defaultValue: 'tckrefactor', description: 'GIT branch name to build TCK (master/tckrefactor)', + string( defaultValue: 'master', description: 'GIT branch name to build TCK (master/tck)', name: 'TCK_BRANCH' ) + choice( description: 'TCK Github org', + name: 'GITHUB_ORG_TCK', + choices: ['jakartaee','olamy']) + string( defaultValue: 'jetty-12.0.x', description: 'GIT branch name to build Jetty (jetty-12.0.x)', name: 'JETTY_BRANCH' ) - string( defaultValue: 'master', description: 'GIT branch name to build arquillian Jetty (master/tck-all-changes)', - name: 'ARQUILLIAN_JETTY_BRANCH' ) - string( defaultValue: 'SNAPSHOT', description: 'Jetty Version', name: 'JETTY_VERSION' ) - choice( - description: 'Arquillian Github org', + choice( description: 'Arquillian Github org', name: 'GITHUB_ORG_ARQUILLIAN', choices: ['arquillian','olamy'] ) - choice( - description: 'TCK Github org', - name: 'GITHUB_ORG_TCK', - choices: ['jakartaee','olamy'] - ) + string( defaultValue: 'master', description: 'GIT branch name to build arquillian Jetty (master/tck-all-changes)', + name: 'ARQUILLIAN_JETTY_BRANCH' ) + string( defaultValue: 'jdk17', description: 'JDK to build Jetty', name: 'JDKBUILD' ) + + string( defaultValue: '', description: 'Extra Maven Args', name: 'MVN_ARGS' ) + } stages { - //stage('Build External') { - //parallel { + stage('Build External') { + parallel { + stage("Checkout Build Jetty 12.0.x") { steps { ws('jetty') { @@ -48,10 +53,10 @@ pipeline { userRemoteConfigs: [[url: 'https://github.com/eclipse/jetty.project.git']]]) timeout(time: 45, unit: 'MINUTES') { withEnv(["JAVA_HOME=${tool "$JDKBUILD"}", - "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "maven3"}/bin", + "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool 'maven3'}/bin", "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) { configFileProvider([configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { - sh "mvn --no-transfer-progress -s $GLOBAL_MVN_SETTINGS -V -B -U clean install -T5 -e -Pfast" + sh "mvn -ntp -s $GLOBAL_MVN_SETTINGS -V -B -U clean install -T5 -e -DskipTests -Dmaven.build.cache.restoreGeneratedSources=false -Dmaven.build.cache.remote.url=dav:http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server" script { if (JETTY_VERSION == "SNAPSHOT") { def model = readMavenPom file: 'pom.xml' @@ -64,6 +69,7 @@ pipeline { } } } + // stage("Checkout Build Arquillian Jetty") { // steps { // ws('arquillian') { @@ -74,10 +80,10 @@ pipeline { // userRemoteConfigs: [[url: 'https://github.com/${GITHUB_ORG_ARQUILLIAN}/arquillian-container-jetty']]]) // timeout(time: 30, unit: 'MINUTES') { // withEnv(["JAVA_HOME=${tool "$JDKBUILD"}", -// "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "maven3"}/bin", +// "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool 'maven3'}/bin", // "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) { // configFileProvider([configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { -// sh "mvn --no-transfer-progress -s $GLOBAL_MVN_SETTINGS -V -B -U clean install -DskipTests -T3 -e -Denforcer.skip=true" +// sh "mvn -ntp -s $GLOBAL_MVN_SETTINGS -V -B -U clean install -DskipTests -T3 -e -Denforcer.skip=true" // } // } // } @@ -85,23 +91,24 @@ pipeline { // } // } - //} - //} + + } + } stage("Checkout Build TCK Sources") { steps { - ws('arquillian') { + ws('tck') { deleteDir() checkout([$class: 'GitSCM', branches: [[name: "*/$TCK_BRANCH"]], extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]], - userRemoteConfigs: [[url: 'https://github.com/${GITHUB_ORG_TCK}/platform-tck']]]) + userRemoteConfigs: [[url: 'https://github.com/${GITHUB_ORG_TCK}/servlet']]]) timeout(time: 30, unit: 'MINUTES') { withEnv(["JAVA_HOME=${tool "$JDKBUILD"}", - "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "maven3"}/bin", + "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool 'maven3'}/bin", "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) { configFileProvider([configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { - sh "mvn -ntp install:install-file -Dfile=./lib/javatest.jar -DgroupId=javatest -DartifactId=javatest -Dversion=5.0 -Dpackaging=jar" - sh "mvn -ntp -s $GLOBAL_MVN_SETTINGS -V -B -U -pl :servlet -am clean install -DskipTests -e" + //sh "mvn -ntp install:install-file -Dfile=./lib/javatest.jar -DgroupId=javatest -DartifactId=javatest -Dversion=5.0 -Dpackaging=jar" + sh "mvn -ntp -s $GLOBAL_MVN_SETTINGS -V -B clean install -e -Dmaven.build.cache.remote.url=dav:http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server" } } } @@ -113,10 +120,10 @@ pipeline { steps { timeout(time: 90, unit: 'MINUTES') { withEnv(["JAVA_HOME=${tool "$JDKBUILD"}", - "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "maven3"}/bin", + "PATH+MAVEN=${env.JAVA_HOME}/bin:${tool 'maven3'}/bin", "MAVEN_OPTS=-Xms4g -Xmx8g -Djava.awt.headless=true"]) { configFileProvider([configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { - sh "mvn -nsu -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.test.failure.ignore=true -V -B -U clean verify -e -Djetty.version=$JETTY_VERSION" + sh "mvn -nsu -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.test.failure.ignore=true -V -B -U clean verify -e -Djetty.version=$JETTY_VERSION $MVN_ARGS" } } } diff --git a/pom.xml b/pom.xml index 85b4ebd..b420995 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.eclipse.jetty.tck @@ -16,14 +16,22 @@ 11 5.10.0 2.0.7 - 1.7.0.Alpha14 2.0.0.Final arquillian-jetty-embedded-12-ee9 - 12.0.0 - 3.1.0 - 10.0.0-SNAPSHOT + 12.0.2-SNAPSHOT + 3.0.0 + 6.1.0-SNAPSHOT + 6.0.0 -Xmx8g -Xms4g + + + false + same_thread + concurrent + fixed + 2 + false @@ -49,13 +57,34 @@ pom import + + org.jboss.arquillian + arquillian-bom + 1.7.1.Final + pom + import + + + org.jboss.shrinkwrap + shrinkwrap-bom + 1.2.6 + pom + import + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-bom + 3.2.1 + pom + import + - jakartatck - servlet + jakarta.servlet + tck-runtime ${jakarta.tck.version} @@ -68,6 +97,16 @@ + + jakarta.servlet + jakarta.servlet-api + ${servlet.api.version} + + + + + + org.jboss.arquillian.container ${arquillian.jetty.artifactId} @@ -114,17 +153,6 @@ jetty-ee9-glassfish-jstl test - - jakartatck - libutil - ${jakarta.tck.version} - - - org.glassfish.metro - * - - - org.slf4j slf4j-api @@ -148,58 +176,57 @@ org.jboss.arquillian.container arquillian-container-test-spi - ${arquillian.core.version} org.jboss.arquillian.junit5 arquillian-junit5-container - ${arquillian.core.version} test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + org.eclipse.jetty + jetty-slf4j-impl + ${jetty.version} + compile + true + + + org.eclipse.jetty + jetty-jmx + compile + + + org.eclipse.jetty + jetty-util-ajax + compile + + + org.eclipse.jetty + jetty-client + compile + + + + + + + + + + + + + + + + + + org.eclipse.jetty + jetty-http-tools + ${jetty.version} + compile + @@ -234,16 +261,29 @@ -Djavax.net.ssl.trustStore=${project.build.directory}/cacerts.jks 15000 - jakartatck:servlet + jakarta.servlet:tck-runtime ${http2.timeout} - - **/URLClient* - **/Client* - + + + + + + + false + + + junit.jupiter.execution.parallel.enabled=${junit.jupiter.execution.parallel.enabled} + junit.jupiter.execution.parallel.mode.default=${junit.jupiter.execution.parallel.mode.default} + junit.jupiter.execution.parallel.mode.classes.default=${junit.jupiter.execution.parallel.mode.classes.default} + junit.jupiter.execution.parallel.config.strategy=${junit.jupiter.execution.parallel.config.strategy} + junit.jupiter.execution.parallel.config.fixed.parallelism=${junit.jupiter.execution.parallel.config.fixed.parallelism} + junit.jupiter.extensions.autodetection.enabled=${junit.jupiter.extensions.autodetection.enabled} + + @@ -268,8 +308,8 @@ - jakartatck - libutil + jakarta.servlet + tck-runtime jar false ${project.build.testOutputDirectory}/ diff --git a/src/test/java/org/eclipse/jetty/tck/AppTest.java b/src/test/java/org/eclipse/jetty/tck/AppTest.java index 25165ba..91f6d60 100644 --- a/src/test/java/org/eclipse/jetty/tck/AppTest.java +++ b/src/test/java/org/eclipse/jetty/tck/AppTest.java @@ -1,17 +1,19 @@ package org.eclipse.jetty.tck; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.slf4j.LoggerFactory; +import servlet.tck.api.jakarta_servlet.servletrequest.ServletRequestTests; /** * Unit test for simple App. */ -public class AppTest extends com.sun.ts.tests.servlet.spec.security.secform.Client // com.sun.ts.tests.servlet.api.jakarta_servlet_http.httpsessionx.URLClient +@Disabled +public class AppTest extends ServletRequestTests { @Test public void foo() throws Exception { - super.test1(); + super.setCharacterEncodingTest1(); } }