Skip to content

Commit

Permalink
use TCK from servlet repo
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy committed Oct 20, 2023
1 parent 434e9da commit 915b260
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 121 deletions.
56 changes: 35 additions & 21 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ permissions:
security-events: read
contents: write
actions: read
id-token: write
checks: write

jobs:
build:
Expand All @@ -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
Expand All @@ -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
63 changes: 35 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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'
Expand All @@ -64,6 +69,7 @@ pipeline {
}
}
}

// stage("Checkout Build Arquillian Jetty") {
// steps {
// ws('arquillian') {
Expand All @@ -74,34 +80,35 @@ 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"
// }
// }
// }
// }
// }
// }

//}
//}

}
}
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"
}
}
}
Expand All @@ -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"
}
}
}
Expand Down
Loading

0 comments on commit 915b260

Please sign in to comment.