diff --git a/its/.github/workflows/maven-verify.yml b/its/.github/workflows/maven-verify.yml new file mode 100644 index 0000000000..4548530a6a --- /dev/null +++ b/its/.github/workflows/maven-verify.yml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Java CI + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + java: [8, 17] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'maven' + + - name: Set up Maven + run: mvn --errors --batch-mode --show-version wrapper:wrapper "-Dmaven=3.8.6" + + - name: Running integration tests + # execute on any push or pull request from forked repo + if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork ) + run: "./mvnw -B clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo" diff --git a/its/Jenkinsfile b/its/Jenkinsfile new file mode 100644 index 0000000000..b63c1733c0 --- /dev/null +++ b/its/Jenkinsfile @@ -0,0 +1,64 @@ +#!groovy + +pipeline { + agent any + // save some io during the build + options { durabilityHint('PERFORMANCE_OPTIMIZED') } + + stages { + stage("Parallel Stage") { + parallel { + stage("Build / Test - mvn latest - JDK8 - ubuntu") { + agent { node { label 'ubuntu' } } + steps { + timeout( time: 180, unit: 'MINUTES' ) { + mavenBuild( "jdk_1.8_latest", "maven_latest") + } + } + } + stage("Build / Test - mvn latest - JDK11 - ubuntu") { + agent { node { label 'ubuntu' } } + steps { + timeout( time: 180, unit: 'MINUTES' ) { + mavenBuild( "jdk_11_latest", "maven_latest") + } + } + } + stage("Build / Test - mvn latest - JDK8 - windowx") { + agent { node { label 'Windows' } } + steps { + timeout( time: 180, unit: 'MINUTES' ) { + mavenBuild( "jdk_1.8_latest", "maven_latest") + } + } + } + stage("Build / Test - mvn latest - JDK11 - windows") { + agent { node { label 'Windows' } } + steps { + timeout( time: 180, unit: 'MINUTES' ) { + mavenBuild( "jdk_11_latest", "maven_latest") + } + } + } + } + } + } +} + +def mavenBuild(jdk, mvnName) { + script { + try { + withMaven(jdk: "$jdk", maven: "$mvnName", publisherStrategy: 'EXPLICIT', mavenOpts: "-Xms2g -Xmx4g -Djava.awt.headless=true") { + if (isUnix()) { + sh "mvn -V clean install -Prun-its,embedded -B" + } else { + bat "mvn -V clean install -Prun-its,embedded -B" + } + } + } + finally + { + junit testResults: 'core-it-suite/target/surefire-reports/*.xml', allowEmptyResults: true + } + } +} diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index 2bccdb1366..8e307a4332 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -72,7 +72,7 @@ under the License. use for the tests. --> ${mavenHome} - https://repo1.maven.org/maven2 + https://repo.maven.apache.org/maven2 false localhost 80 diff --git a/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml b/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml index 78054e6268..c765081a24 100644 --- a/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml +++ b/its/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml @@ -47,6 +47,12 @@ under the License. ${maven-version} provided + + + org.codehaus.plexus + plexus-classworlds + 2.5.2 +