Skip to main content

Custom gates

Custom quality gates give you an option to block a commit from being merged or a build from being promoted if they don't meet the required criteria. By integrating the results of your own test pipelines with custom quality gates, you can take advantage of your existing testing investments and Cloud Platform solutions.

You can create custom quality gates using the Quality Gates app or the CI/CD Manager API.

Verifications for custom gates

To propagate the results of your own test pipelines into Guidewire Cloud Platform, you must use verifications. A verification indicates a status of an artifact, a build or a commit, in relation to a custom quality gate through one of the following statuses:

  • Successful
  • Failed
  • Pending

After you create a custom quality gate and integrate verifications with your own testing infrastructure, you can see a combined status of all your verifications as the quality gates status.

Warning:

All the custom quality gates rely on verifications submitted through API to update their status. Without these verifications, depending on your configuration, you might be blocked from merging a pull request or promoting a build.


Note:

To manage verifications, you can only use the CI/CD Manager API.

Required and optional gates

There are two types of custom gates:

  • A required custom gate.

    It must have a Successful verification status for an artifact to be merged or promoted.

  • An optional custom gate.

    It doesn't block artifacts.

Stages

A custom quality gate can be applied at one of the following stages:

  • Before merging

    There is a required build added for each required pre-merge custom gate in every new PR. You can check the effect of this quality gate in Bitbucket. If a required build for a custom gate for this stage doesn't have a Passed status in Bitbucket, it blocks a pull request from being merged.

    For example, a quality gate for this stage can represent GUnit tests, PCF tests, mutations, or code coverage.

  • Before promoting: pre-prod

    If a required quality gate for this stage doesn't have a Passing status, it blocks a build from being promoted to a pre-production star system.

    For example, a quality gate for this stage can represent tests performed on a deployed app.

  • Before promoting: prod

    If a required quality gate for this stage doesn't have a Passing status, it blocks a build from being promoted to a production star system.

    For example, a quality gate for this stage can represent tests performed on a deployed app.

You can create multiple custom gates for each stage.

You can check the status of custom gates and their verifications in the Quality Gates and Build Promotion apps.

Workflow

The workflow for a custom quality gates depends on the stage and if the quality gate is required or optional:

  • A pre-merge custom gate.

  • A pre-promote custom gate.

Test details

A quality gate represents a specific test through the following parameters:

  • Test category: functional or non-functional.
  • Test method: API, UI, or static analysis.
  • Test level: unit, integration, or system.
  • Test type: acceptance, configuration, performance, sanity, static, or smoke.

See the following examples of quality gates for different kinds of tests:

A third-party static analysis tool
  • Category: Non-functional

  • Method: Static analysis

  • Level: Unit

  • Type: Static

API load tests for BillingCenter
  • Category: Non-functional

  • Method: API

  • Level: System

  • Type: Performance

A set of dynamic UI configuration tests against ContactManager
  • Category: Non-functional

  • Method: UI

  • Level: System

  • Type: Configuration

A suite of UI acceptance tests to test the functional flow through PolicyCenter and ClaimCenter
  • Category: Functional

  • Method: UI

  • Level: Integration

  • Type: Acceptance

Create a custom gate

For each InsuranceSuite app, you must create custom gates separately.

To create a quality gate:

  1. In the Quality gates view, select the InsuranceSuite app for which you want to set the quality gates.

  2. Go to Custom gates and select + Add custom gate.

  3. Provide the following details:

    • Name

      You can use up to 255 characters.

    • ID (Optional)

      The ID is generated automatically based on the gate name.

      To provide a custom ID, select Override ID. You can use letters, numbers, and the following characters: - _ . ! ~ * ' ( ).

    • Required

      By default, a custom gate is required. To make it optional, clear the Required check box.

    • Application

      Select an InsuranceSuite app to which the custom gate applies: ClaimCenter, BillingCenter, PolicyCenter, or ContactManager.

    • Stage

      Select a stage to which the quality gate applies:

      Before merging
      Select the target branches to which the quality gate applies:

      • Any - the quality gate applies to all the branches.
      • Branch name - select a particular target branch.
      • Branch pattern - define a name pattern for branches to which the quality gate applies.
        For details on branch patterns, see Branch patterns

      Before promoting: pre-prod

      Before promoting: prod.

      For details, see Stages.

    • Description (Optional)

      You can provide a description to explain the purpose of the quality gate.

  4. In Test details, define the quality gate with the following parameters:

    • Category: functional or non-functional.
    • Method: API, UI, or static analysis.
    • Level: unit, integration, or system.
    • Type: acceptance, configuration, performance, sanity, static, or smoke. You can select more than one type.

    For details and examples, see Test details.

Important:

After you create a quality gate, you must integrate quality gate verifications with your own system. You can do it only through CI/CD Manager API.
For details see, CI/CD Manager API documentation.

Edit a custom gate

You can modify the following parameters:

  • If the quality gate is required or optional.
  • Description.

To modify a quality gate, select Edit in the Actions column.

Delete a custom gate

You can delete quality gates that you no longer need.

To delete a quality gate, select Delete in the Actions column.

Tip:

Instead of deleting a quality gate, you can make it optional. Optional quality gates don’t block artifacts.