IBM Cloud Docs
Gate to ensure quality

Gate to ensure quality

A gate policy is a set of rules that can be used to ensure that a build meets certain quality criteria before being deployed to your chosen environment. Gates check if your test results comply with a defined policy. If the policy is not met, the DevOps Insights gate fails by default and the build will not deploy. You can also configure gates to act in an advisory role to allow pipeline progression even after failure.

IBM Cloud® DevOps Insights supports many popular formats for test data like unit tests, functional verification tests, and custom data sets, DevOps Insights supports JUnit or XUnit, and Mocha. For code coverage and custom data sets, DevOps Insights supports Cobertura, lcov, and JaCoCo. You can use any tool within your toolchain to run your unit tests, code coverage tests, functional verification tests, and then capture your test results in any one of the supported formats.

For more information about policies, see Defining policies and rules.

For more information about toolchains, see Creating a toolchain from an app.

For more information about data sets, see Managing data sets.

Deployment Risk Policy
Figure 1. Policy and rules page

To go to the Policy Rules page within DevOps Insights, complete the following steps:

  1. From the IBM Cloud console, click the menu icon hamburger icon, and select DevOps.
  2. On the Toolchains page, click your toolchain to open its Overview page.
  3. On the IBM Cloud tools card, click the DevOps Insights tool integration.
  4. From the menu, select Policies and then select a policy.

Gate decisions

In your pipeline, you can enter a command by using the IBM Cloud CLI to check the quality of a build against a predefined policy. When the policy is evaluated, you can check the decision in the DevOps Insights tool.

Build detail page

Deployment Risk details
Figure 2. Build detail

From the Risk Analysis page, you can view gate decision reports on the Build detail page. The Build detail page has information about your latest report.

  1. From the IBM Cloud console, click the menu icon hamburger icon, and select DevOps.
  2. On the Toolchains page, click your toolchain to open its Overview page.
  3. On the IBM Cloud tools card, click the DevOps Insights tool integration.
  4. From the menu, select Risk Analysis and then click the Application tab.
  5. From the table, select the application that you want to view and then select the build.

Decision report

You can also view data for particular decisions based on the policy assigned to a build. From the Build detail page, navigate to the Decision report page. Select View details from the Decisions for this build table for the policiy decision you want to view.