From 14a8f92db813170edb51f7f251851916516c9557 Mon Sep 17 00:00:00 2001 From: Georgii Troitskii Date: Wed, 14 Aug 2024 13:59:56 +0200 Subject: [PATCH] Reduce log size in CI runs (cherry picked from commit 1806bf933465b9b95477603d4f5117a5e8175e2d) --- .github/workflows/pr.yaml | 14 +++++++------- .../quarkus/QuarkusMavenPluginBuildHelper.java | 4 ++-- .../java/io/quarkus/test/utils/MavenUtils.java | 9 ++++++++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 6cce0fbbc..c39108547 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -23,7 +23,7 @@ jobs: cache: 'maven' - name: Build with Maven run: | - mvn -V -B -s .github/mvn-settings.xml clean install -Pframework,examples -Dvalidate-format -DskipTests -DskipITs + mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Pframework,examples -Dvalidate-format -DskipTests -DskipITs - name: Tar Maven Repo shell: bash run: tar -I 'pigz -9' -cf maven-repo-current-fw.tgz -C ~ .m2/repository @@ -55,7 +55,7 @@ jobs: cache: 'maven' - name: Build Quarkus 3.8 run: | - git clone https://github.com/quarkusio/quarkus.git && cd quarkus && git checkout 3.8 && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations + git clone https://github.com/quarkusio/quarkus.git && cd quarkus && git checkout 3.8 && ./mvnw -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations - name: Tar Maven Repo shell: bash run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository @@ -94,7 +94,7 @@ jobs: run: tar -xzf maven-repo-current-fw.tgz -C ~ - name: Build in JVM mode run: | - mvn -B -fae -s .github/mvn-settings.xml clean install -Pexamples + mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pexamples - name: Zip Artifacts run: | zip -R artifacts-quarkus${{ matrix.quarkus-version }}-linux-jvm${{ matrix.java }}.zip '*-reports/*' @@ -132,7 +132,7 @@ jobs: run: tar -xzf maven-repo.tgz -C ~ - name: Build Quarkus CLI run: | - git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 3.8 && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations + git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 3.8 && mvn -B --no-transfer-progress -s ../../../.github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations - name: Install Quarkus CLI run: | cat < ./quarkus-dev-cli @@ -143,7 +143,7 @@ jobs: ./quarkus-dev-cli version - name: Build in JVM mode run: | - mvn -B -fae -s .github/mvn-settings.xml clean install -Pframework,examples,extensions -Drun-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" -Dquarkus.platform.version="${{ matrix.quarkus-version }}" + mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pframework,examples,extensions -Drun-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" -Dquarkus.platform.version="${{ matrix.quarkus-version }}" - name: Zip Artifacts run: | zip -R artifacts-latest-linux-jvm${{ matrix.java }}.zip '*-reports/*' @@ -185,7 +185,7 @@ jobs: run: tar -xzf maven-repo-current-fw.tgz -C ~ - name: Build run: | - mvn -B -fae -s .github/mvn-settings.xml clean install -Pexamples,native -pl '${{ matrix.examples }}' + mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pexamples,native -pl '${{ matrix.examples }}' - name: Zip Artifacts if: failure() run: | @@ -224,7 +224,7 @@ jobs: - name: Build in JVM mode shell: bash run: | - mvn -B -fae -s .github/mvn-settings.xml clean install -Pframework,examples -Dquarkus.platform.version="${{ matrix.quarkus-version }}" + mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pframework,examples -Dquarkus.platform.version="${{ matrix.quarkus-version }}" - name: Zip Artifacts shell: bash if: failure() diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusMavenPluginBuildHelper.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusMavenPluginBuildHelper.java index cf1e28da4..8fc5b49a6 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusMavenPluginBuildHelper.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusMavenPluginBuildHelper.java @@ -211,8 +211,8 @@ private Optional moveToPermanentLocation(Path tempNativeExecutablePath) { } private String[] getBuildNativeExecutableCmd() { - Stream cmdStream = Stream.of(mvnCmd(), "clean", "install", "-Dquarkus.build.skip=false", - "-Dnative", "-DskipTests", "-DskipITs", "-Dcheckstyle.skip", + Stream cmdStream = Stream.of(mvnCmd(), "-B", "--no-transfer-progress", "clean", "install", + "-Dquarkus.build.skip=false", "-Dnative", "-DskipTests", "-DskipITs", "-Dcheckstyle.skip", toMvnSystemProperty(PLATFORM_VERSION.getPropertyKey(), getVersion()), toMvnSystemProperty(PLATFORM_GROUP_ID.getPropertyKey(), PLATFORM_GROUP_ID.get()), toMvnSystemProperty(PLUGIN_VERSION.getPropertyKey(), getPluginVersion())); diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/utils/MavenUtils.java b/quarkus-test-core/src/main/java/io/quarkus/test/utils/MavenUtils.java index e1d735e53..e375f1ef4 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/utils/MavenUtils.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/utils/MavenUtils.java @@ -32,6 +32,7 @@ public final class MavenUtils { public static final String DISPLAY_ERRORS = "-e"; public static final String BATCH_MODE = "-B"; public static final String DISPLAY_VERSION = "-V"; + public static final String SKIP_PROGRESS = "--no-transfer-progress"; public static final String SKIP_CHECKSTYLE = "-Dcheckstyle.skip"; public static final String QUARKUS_PROFILE = "quarkus.profile"; public static final String QUARKUS_PROPERTY_PREFIX = "quarkus"; @@ -54,7 +55,9 @@ public static void build(ServiceContext serviceContext, Path basePath, List command = mvnCommand(serviceContext); command.addAll(extraMavenArgs); command.add(DISPLAY_ERRORS); + command.add(BATCH_MODE); command.add(DISPLAY_VERSION); + command.add(SKIP_PROGRESS); command.add(PACKAGE_GOAL); try { new Command(command) @@ -70,6 +73,7 @@ public static void build(ServiceContext serviceContext, Path basePath, List devModeMavenCommand(ServiceContext serviceContext, List systemProperties) { List command = mvnCommand(serviceContext); command.addAll(Arrays.asList(SKIP_CHECKSTYLE, SKIP_ITS)); + command.addAll(Arrays.asList(BATCH_MODE, SKIP_PROGRESS)); command.addAll(systemProperties); command.add(withProperty("debug", "false")); command.add("quarkus:dev"); @@ -81,6 +85,8 @@ public static List mvnCommand(ServiceContext serviceContext) { List args = new ArrayList<>(); args.add(MVN_COMMAND); args.add(DISPLAY_ERRORS); + args.add(SKIP_PROGRESS); + args.add(BATCH_MODE); args.add(withQuarkusProfile(serviceContext)); withMavenRepositoryLocalIfSet(args); withProperties(args); @@ -109,7 +115,8 @@ public static void installParentPomsIfNeeded(Path basePath) { private static void installParentPom(Path relativePath) { List args = new ArrayList<>(); - args.addAll(asList(MVN_COMMAND, DISPLAY_ERRORS, INSTALL_GOAL, SKIP_CHECKSTYLE, SKIP_TESTS, SKIP_ITS, "-pl", ".")); + args.addAll(asList(MVN_COMMAND, DISPLAY_ERRORS, BATCH_MODE, SKIP_PROGRESS, INSTALL_GOAL, SKIP_CHECKSTYLE, SKIP_TESTS, + SKIP_ITS, "-pl", ".")); withMavenRepositoryLocalIfSet(args); withProperties(args);