Configuring Quality Gates
Set the threshold based on the quality requirements to check whether the project is ready for production. If the actual check result surpasses the gate threshold, the project is deemed unfit for production.
Quality gate can be set at the tenant, project, and task levels in a descending order of precedence. The navigation paths are as follows:
- Tenant level: Go to the CodeArts Check homepage, and choose Config Center. The Quality Gate details are displayed by default.
- Project level: Go to the project details page, and choose Code > Check > Config Center > Quality Gate.
- Task level: Go to the task details page, and choose Settings > Quality Gate.
This section uses a task-level quality gate as an example to describe how to configure a quality gate.
- Access CodeArts Check.
- Go to the task page. In the task list, click a task name.
- On the task details page, choose Settings > Quality Gate.
- In the Quality Gate area, enable gate items and set thresholds based on quality requirements.
Table 1 Configuring a quality gate Item
Description
Issue Level
There are four issue levels: critical issues, major issues, minor issues, and suggestions.
Operator
The operator is fixed to ≤. It indicates that the gate condition is met when the actual number of issues is no more than the threshold.
Threshold
The value ranges from 0 to 2147483647.
Status
If the issue level is disabled, the gate action will not be triggered, even when the number of issues exceeds the threshold.
- Click Save.
You can click Execute Check and view the check results.
If the issues of a gate item exceed the corresponding thresholds for a gate, Failed is displayed in the Task-level Gate Result area of the Overview tab page. Fix code as prompted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
