Help Center> CodeArts Pipeline> FAQs> Functions> What Are Pass Conditions?
Updated on 2023-11-14 GMT+08:00

What Are Pass Conditions?

CodeArts Pipeline provides unified pass condition management. Pass conditions are quality metric thresholds used for automated monitoring in a pipeline. You can configure rules and policies as pass conditions to control pipeline execution.

Currently, only pass conditions of standard policies are supported. When configuring a pipeline, click under a stage. In the Pass Conditions dialog box, move the cursor to the pass condition card and click Add to add the pass condition for this stage, and configure a policy for the pass condition.

  • Rules: Set the comparison relationship and threshold criteria for creating and editing policies based on output thresholds of extensions. The comparison relationship and threshold criteria are applied as pipeline pass conditions. Currently, the following extensions are supported:
    • Check: You can set thresholds for the problems found in code check results.

      If the number of problems is less than or equal to the threshold, the code check is passed and the pipeline continues to run. Otherwise, the code check fails and the pipeline execution is terminated.

    • TestPlan: You can set the test pass rate thresholds for APIs in the test suite.

      When the pass rate is greater than or equal to the threshold, the test is passed, and the pipeline continues to run. Otherwise, the test fails, and execution of the pipeline is terminated.

  • Policies: a set of rules. Each rule corresponds to a condition template of the output metric value in an extension. You can select policies during pipeline orchestration as pass conditions to control pipeline execution.

Currently, pass conditions are supported only in LA-Mexico City2.

Functions FAQs

more