Codemagic integration
Information on setting up Codemagic with SonarQube Server.
Adding SonarQube Server scripts to your Codemagic .yml file
scripts:
- |
# download and install the SonarScanner
wget -O $FCI_BUILD_DIR/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-macosx.zip
# If running in a Linux environment, download https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-linux.zip
unzip $FCI_BUILD_DIR/sonar-scanner.zip
mv sonar-scanner-* sonar-scanner
- |
# Generate and upload code analysis report
export PATH=$PATH:$FCI_BUILD_DIR/sonar-scanner/bin
sonar-scanner \
-Dsonar.projectKey=YOUR_PROJECT_KEY \
-Dsonar.host.url=SONARQUBE_URL \Automatically detecting pull requests
Caching the .sonar folder
Last updated
Was this helpful?

