Sign inSign up

codescan/codescancloud-quality-gate

By codescan

•Updated over 7 years ago

Image
0

3.5K

codescan/codescancloud-quality-gate repository overview

⁠Bitbucket Pipelines Pipe: CodeScanCloud Quality Gate check

Check the Quality Gate of your code with CodeScanCloud⁠ to ensure good quality before releasing or deploying new features.

⁠YAML Definition

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

⁠Variables

VariableUsage
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_TIMEOUTMaximum seconds to wait to get quality gate status. Default value is 300 (5 minutes).

(*) = required variable.

⁠Details

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.

⁠Prerequisites

To use this pipe you must have the CodeScanCloud Scan pipe⁠ earlier in the pipeline.

⁠Examples

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

⁠Support

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:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce

Tag summary

Content type

Image

Digest

Size

53.8 MB

Last updated

over 7 years ago

docker pull codescan/codescancloud-quality-gate