vy commented on code in PR #1321: URL: https://github.com/apache/logging-log4j2/pull/1321#discussion_r1124627405
########## .github/workflows/build.yml: ########## @@ -67,25 +67,43 @@ 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: | ./mvnw \ --show-version --batch-mode --errors --no-transfer-progress \ -DskipTests=true \ - clean verify artifact:compare - - - name: Verify build reproducibility - shell: bash - run: | + clean verify artifact:compare || failed=1 for report_file in target/*.buildcompare **/target/*.buildcompare; do 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: Reports for report build reproducibility + if: failure() && steps.report-reproducible.outcome == 'failure' + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce + with: + name: target-artifacts-${{matrix.os}} + path: "**/target/*.buildcompare" + - name: Artifacts for report build reproducibility + if: failure() && steps.report-reproducible.outcome == 'failure' + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce + with: + name: target-artifacts-${{matrix.os}} + path: "*/target/*.jar" + - name: Artifacts for report build reproducibility + if: failure() && steps.report-reproducible.outcome == 'failure' + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce + with: + name: target-artifacts-${{matrix.os}} + path: "*/target/reference/*.jar" Review Comment: ```suggestion - name: Upload artifacts for troubleshooting 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 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org