aboutsummaryrefslogtreecommitdiffstats
path: root/.cirrus/cirrus-build.sh
blob: 74362be0452026b171a89d674cd3acd94f9de190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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