diff options
Diffstat (limited to '.cirrus/cirrus-build.sh')
-rwxr-xr-x | .cirrus/cirrus-build.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.cirrus/cirrus-build.sh b/.cirrus/cirrus-build.sh new file mode 100755 index 00000000000..74362be0452 --- /dev/null +++ b/.cirrus/cirrus-build.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +source .cirrus/cirrus-env + +./gradlew build \ + -DbuildNumber="$BUILD_NUMBER" \ + -x test \ + --parallel --console plain --build-cache + +pushToCirrusCiCache() { + cd "${1}" + zipfile=$(ls -- *.zip) + echo "Uploading $zipfile to CirrusCI cache" + curl -s -X POST --data-binary @"$zipfile" "http://$CIRRUS_HTTP_CACHE_HOST/$zipfile" + echo "$zipfile successfully uploaded to CirrusCI cache" +} + +export -f pushToCirrusCiCache +pushToCirrusCiCache sonar-application/build/distributions |