mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
This makes checkPart4 tasks in general configuration cache compliant. We do not enable it by default in our pipelines yet. That will eventually be done in separate PRs. To track any regressions we cover the checkPart4 task in the weekly gradle cache validation build job
26 lines
784 B
Bash
Executable file
26 lines
784 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# This is a workaround for https://github.com/gradle/gradle/issues/28159
|
|
.ci/scripts/run-gradle.sh --no-daemon $@
|
|
|
|
.ci/scripts/run-gradle.sh --configuration-cache -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2 $@
|
|
|
|
# Create a temporary file
|
|
tmpOutputFile=$(mktemp)
|
|
trap "rm $tmpOutputFile" EXIT
|
|
|
|
echo "2nd run"
|
|
.ci/scripts/run-gradle.sh --configuration-cache -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2 $@ | tee $tmpOutputFile
|
|
|
|
# Check if the command was successful
|
|
if grep -q "Configuration cache entry reused." $tmpOutputFile; then
|
|
echo "Gradle configuration cache reused"
|
|
exit 0
|
|
else
|
|
echo "Failed to reuse Gradle configuration cache."
|
|
exit 1
|
|
fi
|
|
|
|
|