Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upload of Develocity build scans #9173

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading