Skip to content

Commit

Permalink
Fix upload of Develocity build scans
Browse files Browse the repository at this point in the history
Don't tar them, as this was broken: we ended up uploading the
build-scan-data directory instead of the tar, while still expecting a
tar when dowloading, which made everything fail.

We don't need tars anyway, as workflow artifacts are already zipped.
  • Loading branch information
yrodiere committed Oct 28, 2024
1 parent b44833b commit 6551aa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
run: |
shopt -s nullglob # Don't run the loop below if there are no artifacts
status=0
mkdir -p ~/.gradle/
for build_scan_data_directory in /tmp/downloaded-build-scan-data/*
do
rm -rf ~/.gradle/build-scan-data
mkdir -p ~/.gradle/build-scan-data
tar -xzf "$build_scan_data_directory/build-scan-data.tgz" -C ~/.gradle/build-scan-data \
mv "$build_scan_data_directory" ~/.gradle/build-scan-data \
&& ./gradlew --no-build-cache buildScanPublishPrevious || status=1
done
exit $status
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ jobs:
POPULATE_REMOTE_GRADLE_CACHE: ${{ github.event_name == 'push' && github.repository == 'hibernate/hibernate-orm' && 'true' || 'false' }}
DEVELOCITY_ACCESS_KEY: "${{ secrets.DEVELOCITY_ACCESS_KEY }}"

# For jobs running on 'pull_request', tar and upload build scan data.
# For jobs running on 'pull_request', upload build scan data.
# The actual publishing must be done in a separate job (see ci-report.yml).
# We don't write to the remote cache as that would be unsafe.
- name: Tar build scan content pushed to subsequent jobs
if: "${{ github.event_name == 'pull_request' && !cancelled() }}"
run: tar -czf build-scan-data.tgz -C ~/.gradle/build-scan-data .
- name: Upload GitHub Actions artifact for the Develocity build scan
uses: actions/upload-artifact@v4
if: "${{ github.event_name == 'pull_request' && !cancelled() }}"
Expand Down Expand Up @@ -219,13 +216,10 @@ jobs:
RUNID: ${{ github.run_number }}
run: ./ci/build-github.sh
shell: bash
# Tar and upload build scan data.
# Upload build scan data.
# The actual publishing must be done in a separate job (see ci-report.yml).
# We don't write to the remote cache as that would be unsafe.
# That's even on push, because we do not trust Atlas runners to hold secrets: they are shared infrastructure.
- name: Tar build scan content pushed to subsequent jobs
if: "${{ !cancelled() }}"
run: tar -czf build-scan-data.tgz -C ~/.gradle/build-scan-data .
- name: Upload GitHub Actions artifact for the Develocity build scan
uses: actions/upload-artifact@v4
if: "${{ !cancelled() }}"
Expand Down

0 comments on commit 6551aa5

Please sign in to comment.