From 6c74363197beed1f31e4203c8eb0c2dce371c1fc Mon Sep 17 00:00:00 2001 From: Krystian Dabrowski Date: Thu, 20 Jun 2024 16:30:20 +0200 Subject: [PATCH] ACS-8120: dump Docker logs on CI --- .github/workflows/ci.yml | 16 ++-------------- prediction-applier-extension/pom.xml | 4 ++-- ...redictionApplierExtensionIntegrationTest.java | 6 +----- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8714c572..18ff3278f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,11 +94,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v5.25.0 - name: "Test application" - id: tests - run: mvn ${{ env.MAVEN_CLI_OPTS }} clean verify -pl '${{ matrix.subproject }}' -am -DfailIfNoTests=false - - name: "Dump all Docker containers logs" - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v1.41.0 - if: failure() && steps.tests.outcome == 'failure' + run: mvn ${{ env.MAVEN_CLI_OPTS }} clean verify -pl '${{ matrix.subproject }}' -am test_distribution: name: "Build application with distribution profile" @@ -123,11 +119,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2 - name: "Build application with distribution profile" - id: tests - run: mvn ${{ env.MAVEN_CLI_OPTS }} clean install -Pdistribution -DskipTests -Dalfresco-platform.version=${{ matrix.repoVersion }} - - name: "Dump all Docker containers logs" - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v1.41.0 - if: failure() && steps.tests.outcome == 'failure' + run: mvn ${{ env.MAVEN_CLI_OPTS }} clean install -DskipTests -Dalfresco-platform.version=${{ matrix.repoVersion }} run_e2e_test: name: "Run e2e tests" @@ -157,11 +149,7 @@ jobs: - name: "Build docker images" run: bash ./scripts/ci/buildDockerImages.sh - name: "Run e2e tests" - id: tests run: mvn ${{ env.MAVEN_CLI_OPTS }} verify -pl 'prediction-applier-extension,e2e-test' -am -DskipUnitTests -DskipIntegrationTests -Dalfresco-platform.version=${{ matrix.repoVersion }} - - name: "Dump all Docker containers logs" - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v1.41.0 - if: failure() && steps.tests.outcome == 'failure' push_docker_images: name: "Push docker images" diff --git a/prediction-applier-extension/pom.xml b/prediction-applier-extension/pom.xml index 2f69f0392..336c0da38 100644 --- a/prediction-applier-extension/pom.xml +++ b/prediction-applier-extension/pom.xml @@ -14,7 +14,7 @@ jar - 4.0.0 + 4.0.0 @@ -56,7 +56,7 @@ org.apache.camel camel-http - ${camel.version} + ${spring-camel.version} diff --git a/prediction-applier-extension/src/integration-test/java/org/alfresco/hxi_connector/prediction_applier/PredictionApplierExtensionIntegrationTest.java b/prediction-applier-extension/src/integration-test/java/org/alfresco/hxi_connector/prediction_applier/PredictionApplierExtensionIntegrationTest.java index e7ecf249d..616f5de0e 100644 --- a/prediction-applier-extension/src/integration-test/java/org/alfresco/hxi_connector/prediction_applier/PredictionApplierExtensionIntegrationTest.java +++ b/prediction-applier-extension/src/integration-test/java/org/alfresco/hxi_connector/prediction_applier/PredictionApplierExtensionIntegrationTest.java @@ -27,7 +27,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.core.config.Configurator; import org.junit.jupiter.api.BeforeAll; @@ -44,7 +43,6 @@ import org.alfresco.rest.api.model.Aspect; @Testcontainers -@Slf4j @SuppressWarnings("PMD.FieldNamingConventions") public class PredictionApplierExtensionIntegrationTest { @@ -64,19 +62,17 @@ public class PredictionApplierExtensionIntegrationTest @BeforeAll static void beforeAll() { - Configurator.setAllLevels("", Level.ALL); + Configurator.setAllLevels("", Level.INFO); } @Test void testHxIModelInstallation() { - log.info("before test - testHxIModelInstallation"); // when Aspect actualAspect = aspectsClient.getAspectById(EXPECTED_HXI_ASPECT); // then assertThat(actualAspect).isNotNull(); - log.info("after test - testHxIModelInstallation"); } private static AlfrescoRepositoryContainer createRepositoryContainer()