Run all maven commands inside the ubi docker container

Closes #33881

Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
rmartinc 2024-10-14 12:48:07 +02:00 committed by Marek Posolda
parent 43c55e0211
commit 10aca55523
2 changed files with 62 additions and 54 deletions

View file

@ -16,5 +16,23 @@ echo "Tests: $TESTS"
export JAVA_HOME=/etc/alternatives/java_sdk_21 export JAVA_HOME=/etc/alternatives/java_sdk_21
set -o pipefail set -o pipefail
# Build adapter distributions
./mvnw install -DskipTests -f distribution/pom.xml
if [ $? -ne 0 ]; then
exit 1
fi
# Build app servers
./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml
if [ $? -ne 0 ]; then
exit 1
fi
# Prepare Quarkus distribution with BCFIPS
./mvnw install -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus,auth-server-fips140-2
if [ $? -ne 0 ]; then
exit 1
fi
# Profile app-server-wildfly needs to be explicitly set for FIPS tests # Profile app-server-wildfly needs to be explicitly set for FIPS tests
./mvnw test -Dsurefire.rerunFailingTestsCount=$SUREFIRE_RERUN_FAILING_COUNT -nsu -B -Pauth-server-quarkus,auth-server-fips140-2,app-server-wildfly -Dcom.redhat.fips=false $STRICT_OPTIONS -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh ./mvnw test -Dsurefire.rerunFailingTestsCount=$SUREFIRE_RERUN_FAILING_COUNT -nsu -B -Pauth-server-quarkus,auth-server-fips140-2,app-server-wildfly -Dcom.redhat.fips=false $STRICT_OPTIONS -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh

View file

@ -704,59 +704,49 @@ jobs:
with: with:
job-id: fips-unit-tests job-id: fips-unit-tests
# fips-integration-tests: fips-integration-tests:
# name: FIPS IT name: FIPS IT
# needs: build needs: build
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# timeout-minutes: 45 timeout-minutes: 45
# strategy: strategy:
# matrix: matrix:
# mode: [non-strict, strict] mode: [non-strict, strict]
# fail-fast: false fail-fast: false
# steps: steps:
# - uses: actions/checkout@v4 - uses: actions/checkout@v4
#
# - name: Fake fips - name: Fake fips
# run: | run: |
# cd .github/fake_fips cd .github/fake_fips
# make make
# sudo insmod fake_fips.ko sudo insmod fake_fips.ko
#
# - id: integration-test-setup - id: integration-test-setup
# name: Integration test setup name: Integration test setup
# uses: ./.github/actions/integration-test-setup uses: ./.github/actions/integration-test-setup
# with: with:
# jdk-version: 21 jdk-version: 21
#
# - name: Build adapter distributions - name: Run base tests
# run: ./mvnw install -DskipTests -f distribution/pom.xml run: docker run --rm --workdir /github/workspace -e "SUREFIRE_RERUN_FAILING_COUNT" -v "${{ github.workspace }}":"/github/workspace" -v "$HOME/.m2":"/root/.m2" registry.access.redhat.com/ubi8/ubi:latest .github/scripts/run-fips-it.sh ${{ matrix.mode }}
#
# - name: Build app servers - name: Upload JVM Heapdumps
# run: ./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml if: always()
# uses: ./.github/actions/upload-heapdumps
#
# - name: Prepare Quarkus distribution with BCFIPS - uses: ./.github/actions/upload-flaky-tests
# run: ./mvnw install -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus,auth-server-fips140-2 name: Upload flaky tests
# env:
# - name: Run base tests GH_TOKEN: ${{ github.token }}
# run: docker run --rm --workdir /github/workspace -e "SUREFIRE_RERUN_FAILING_COUNT" -v "${{ github.workspace }}":"/github/workspace" -v "$HOME/.m2":"/root/.m2" registry.access.redhat.com/ubi8/ubi:latest .github/scripts/run-fips-it.sh ${{ matrix.mode }} with:
# job-name: FIPS IT
# - name: Upload JVM Heapdumps
# if: always() - name: Surefire reports
# uses: ./.github/actions/upload-heapdumps if: always()
# uses: ./.github/actions/archive-surefire-reports
# - uses: ./.github/actions/upload-flaky-tests with:
# name: Upload flaky tests job-id: fips-integration-tests-${{ matrix.mode }}
# env:
# GH_TOKEN: ${{ github.token }}
# with:
# job-name: FIPS IT
#
# - name: Surefire reports
# if: always()
# uses: ./.github/actions/archive-surefire-reports
# with:
# job-id: fips-integration-tests-${{ matrix.mode }}
forms-integration-tests: forms-integration-tests:
name: Forms IT name: Forms IT
@ -975,7 +965,7 @@ jobs:
- store-model-tests - store-model-tests
- clustering-integration-tests - clustering-integration-tests
- fips-unit-tests - fips-unit-tests
# - fips-integration-tests - fips-integration-tests
- forms-integration-tests - forms-integration-tests
- webauthn-integration-tests - webauthn-integration-tests
- sssd-unit-tests - sssd-unit-tests