Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - Sonarqube Developer Edition 9
- what are you trying to achieve: Integrating Xcode 12.5.1 and Swift with Sonar 9 through Azure Pipeline
- what have you tried so far to achieve this: Since for Swift, there was no documentation, have used followed the following process:
- In Azure DevOps, create or edit a build Pipeline to make Build Wrapper available on the build agent.
- Add a Bash script task, select inline mode and add the following script to download and decompress the Build Wrapper on the build agent.
curl ‘https://sonar-poc.tatadigital.com/static/cpp/build-wrapper-macosx-x86.zip’ --output build-wrapper.zip unzip build-wrapper.zip
- Add a new Prepare Analysis Configuration task before your build task
- Select the SonarQube server endpoint you created in Step 2
- Under Choose the way to run the analysis , select Use standalone scanner
- Select the Manually provide configuration mode
- In the Project Key field, enter
- In Additional Properties in the Advanced section, add a new property to set the output directory to which the Build Wrapper should write its results:
- Add or modify your build Command Line task. For the analysis to happen, your build has to be run through a command line so that it can be wrapped-up by the build-wrapper.
- Run Build Wrapper executable. Pass in as the arguments (1) the output directory configured in the previous task and (2) the command that runs a clean build of your project (not an incremental build). Example:
./build-wrapper-macos-x86/build-wrapper-macos-x86 --out-dir bw-output xcodebuild -project myproject.xcodeproj -configuration Release clean build
- Add a new Run Code Analysis task after your build task. Consider running this task right after the previous one as the build environment should not be significantly altered before running the analysis.
- Add a new Publish Quality Gate Result task to publish SonarQube’s Quality Gate results on your build pipeline summary
This task may increase your build time as your pipeline will have to wait for SonarQube to process the analysis report. It is highly recommended but optional.
- Under the Triggers tab of your pipeline, check Enable continuous integration and select all the branches for which you want the SonarQube analysis to run automatically
It is getting failed since for swift code architecture is different and it is not able to find the project.
Plz help with the process to integrate Sonar 9 with Swift and Xcode 12.5.1