I get the below error for sonarcloud/scan on circleCI. Could someone point in right direction?
#!/bin/bash --login -eo pipefail
set -e
VERSION=4.1.0.1829
SONAR_TOKEN=$SONAR_TOKEN
SCANNER_DIRECTORY=/tmp/cache/scanner
export SONAR_USER_HOME=$SCANNER_DIRECTORY/.sonar
OS="linux"
echo $SONAR_USER_HOME
if [[ ! -x "$SCANNER_DIRECTORY/sonar-scanner-$VERSION-$OS/bin/sonar-scanner" ]]; then
curl -Ol https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$VERSION-$OS.zip
unzip -qq -o sonar-scanner-cli-$VERSION-$OS.zip -d $SCANNER_DIRECTORY
fi
chmod +x $SCANNER_DIRECTORY/sonar-scanner-$VERSION-$OS/bin/sonar-scanner
chmod +x $SCANNER_DIRECTORY/sonar-scanner-$VERSION-$OS/jre/bin/java
$SCANNER_DIRECTORY/sonar-scanner-$VERSION-$OS/bin/sonar-scanner
/tmp/cache/scanner/.sonar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40.4M 100 40.4M 0 0 10.8M 0 0:00:03 0:00:03 --:--:-- 10.8M
/tmp/cache/scanner/sonar-scanner-4.1.0.1829-linux/bin/sonar-scanner: line 64: /private/tmp/cache/scanner/sonar-scanner-4.1.0.1829-linux/jre/bin/java: cannot execute binary file
/tmp/cache/scanner/sonar-scanner-4.1.0.1829-linux/bin/sonar-scanner: line 64: /private/tmp/cache/scanner/sonar-scanner-4.1.0.1829-linux/jre/bin/java: Undefined error: 0
Exited with code exit status 1
CircleCI received exit code 1
Details regarding the project:
- iOS Swift Project
- Hosted at github private repo
- CI system is CircleCI as mentioned already
- Relevant part ofCircleCI config file:
- Yes I have the sonar-project.properties file. No edits made.