Check the Quality Gate of your code with CodeScanCloud to ensure good quality before releasing or deploying new features.
Add the following snippet to the script section of your bitbucket-pipelines.yml file:
- pipe: codescan/codescancloud-quality-gate:1.0.0
# variables:
# SONAR_QUALITY_GATE_TIMEOUT: '<int>' # Optional
| Variable | Usage |
|---|---|
| SONAR_TOKEN (*) | CodeScanCloud token. It is recommended to use a secure repository or account variable. And in this case there is no need to specify this variable in the bitbucket-pipelines.yml file. |
| SONAR_QUALITY_GATE_TIMEOUT | Maximum seconds to wait to get quality gate status. Default value is 300 (5 minutes). |
(*) = required variable.
This pipe takes the task id from the report produced by the CodeScanCloud Scan pipe and polls CodeScanCloud until the quality gate result is ready.
If the quality gate passes, the pipe completes with success.
If the quality gate fails, the pipe prints the failed conditions and exits with failure.
To use this pipe you must have the CodeScanCloud Scan pipe earlier in the pipeline.
Basic example:
- pipe: codescan/codescancloud-quality-gate:1.0.0
A bit more advanced example:
- pipe: codescan/codescancloud-quality-gate:1.0.0
variables:
SONAR_QUALITY_GATE_TIMEOUT: 180 # 3 minutes
If you would like help with this pipe, or you have an issue or feature request, [let us know on our support email][mailto:[email protected]].
If you are reporting an issue, please include:
Content type
Image
Digest
Size
53.8 MB
Last updated
over 7 years ago
docker pull codescan/codescancloud-quality-gate