This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/2.x by this push:
new 2207020456 Upload reproducibility failure context artifacts in CI
(#1321)
2207020456 is described below
commit 2207020456ef65f2f3d472199a168c8238b0ceff
Author: Josh Soref <[email protected]>
AuthorDate: Fri Mar 3 10:38:56 2023 -0500
Upload reproducibility failure context artifacts in CI (#1321)
Co-authored-by: Volkan Yazıcı <[email protected]>
---
.github/workflows/build.yml | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3fe236b57a..e945e295ad 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -81,6 +81,7 @@ jobs:
# `clean verify artifact:compare` is required to generate the build
reproducibility report.
# For details, see:
https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
- name: Report build reproducibility
+ id: report-reproducible
timeout-minutes: 10
shell: bash
run: |
@@ -88,7 +89,7 @@ jobs:
--show-version --batch-mode --errors --no-transfer-progress \
--global-toolchains ".github/workflows/maven-toolchains.xml" \
-DskipTests=true \
- clean verify artifact:compare
+ clean verify artifact:compare || failed=1
# `artifact:compare` doesn't fail the build in case of a reproducibility
problem.
# Below we manually check reproducibility build reports and fail the
build, if necessary.
@@ -99,9 +100,22 @@ jobs:
if ! grep -q "^ko=0$" "$report_file"; then
echo "Spotted build reproducibility failure in \`$report_file\`:"
cat "$report_file"
- exit 1
+ failed=1
fi
done
+ if [ -n "$failed" ]; then
+ exit $failed
+ fi
+
+ - name: Upload reproducibility failure context artifacts
+ if: failure() && steps.report-reproducible.outcome == 'failure'
+ uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
+ with:
+ name: reproducubility-failure-context-${{matrix.os}}
+ path: |
+ **/target/*.buildcompare
+ **/target/*.jar
+ **/target/reference/*.jar
- name: Maven "verify"
timeout-minutes: 60