jsoref commented on code in PR #1321: URL: https://github.com/apache/logging-log4j2/pull/1321#discussion_r1123749953
########## .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 Review Comment: This was failing before we could get anything close to helpful human reporting ########## .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 Review Comment: This way users can see all the faults, and then it fails. ########## .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 Review Comment: The old code was fail on first found fault instead of telling users about all the faults ########## .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@v3 + 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@v3 + 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@v3 + with: + name: target-artifacts-${{matrix.os}} + path: "*/target/reference/*.jar" Review Comment: And when it fails, we assemble an artifact that contains information that would hopefully help a user understand why it failed... -- 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