Hi all,
I’m setting up the pipelines to build and scan a C++ project. I’ve reached the point where I can successfully build, scan and submit it, but I’m now only missing the Quality Gate.
The build runs on Bitbucket (Cloud) Pipelines, using a custom Docker image.
I’ve set it up successfully before on a Python project, as I used the pipe
s for both analysing and quality-gate-ing. As this is a C++ project, I had to run sonar-scanner
via CLI inside the build container I created.
This is the step I’m using:
name: Build and scan Video pipeline
image: nicovillanueva/pipelinesbuild
script:
- cd videopipeline/
- cmake [...] .
- /usr/bin/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir wrapper_output_dir make clean all
- sonar-scanner
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
The final step “obviously” fails, as it runs on a pipe, whilst the rest doesn’t. The error is:
Quality Gate failed: Could not get scanner report: [Errno 2] No such file or directory: '/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan/sonarcloud-scan.log'
Any pointers on how I could quality-gate this pipeline?
Thank you!