Skip to content

Commit

Permalink
ACS-8120: dump Docker logs on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
krdabrowski committed Jun 20, 2024
1 parent bf7a3f6 commit 6c74363
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions prediction-applier-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<packaging>jar</packaging>

<properties>
<camel.version>4.0.0</camel.version>
<spring-camel.version>4.0.0</spring-camel.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -56,7 +56,7 @@
<dependency> <!-- Camel version in extension has to be the same as in ACS -->
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
<version>${camel.version}</version>
<version>${spring-camel.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -44,7 +43,6 @@
import org.alfresco.rest.api.model.Aspect;

@Testcontainers
@Slf4j
@SuppressWarnings("PMD.FieldNamingConventions")
public class PredictionApplierExtensionIntegrationTest
{
Expand All @@ -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()
Expand Down

0 comments on commit 6c74363

Please sign in to comment.