Skip to main content

Configure automatic test triggering on branches

You can use CI/CD Manager API to modify branch triggering rules for Server Tests, Build Application, and Dockerize Application builds.

All sample requests in this guide include the following path parameters:

Parameter nameDescription
tenantIdTenant ID.
starSystemIdID of the star system that includes the InsuranceSuite application for which you modify the CI/CD configuration.
applicationIdInsuranceSuite application which includes the build. For example:
- PC for PolicyCenter
- BC for BillingCenter
- CC for ClaimCenter
- CM for ContactManager

Note:

In the request URLs, substitute {baseUrl} with the correct URL for your region. For details, see Base URLs.

Default settings

By default, builds are configured to run automatically for changes on the following branches:

Name of a buildBranches
Server TestAll the branches
Build Application- <default>
- feature/*
- develop
- release/*
Dockerize Application- <default>
- feature/*
- develop
- release/*

Where <default> is an accepted literal value as it’s the default branch of a repository.

Constraints for include and exclude rules

For each build, you can configure include and exclude rules for branches and branch patterns. The following constraints apply:

  • The include rules must consist of at least one entry.

  • Each rule must match the following pattern:
    <default>|[a-zA-Z0-9]+[-,_./a-zA-Z0-9]*|\*[-,_./a-zA-Z0-9]*|[a-zA-Z0-9]+[-,_./a-zA-Z0-9]*\*[-,_./a-zA-Z0-9]*

  • You can use only one wildcard * in each branch pattern.

Note:

Expanding your branch rules might immediately trigger pending changes on the newly included branches.

Build dependencies

The Server Tests, Build Application, and Dockerize Application builds depend on one another in the following ways:

  • Build Application is triggered by VCS changes, but it depends on Server Tests. If Build Application is run, automatically or manually, the Server Tests build is run as well, even if Server Tests trigger is turned off for a given branch.

  • Dockerize Application isn't triggered by VCS changes but only by Build Application build finished event. It will be triggered just after Build Application build finishes on branches that match the triggering rules for the Dockerize Application build.

  • If you trigger Dockerize Application manually, Build Application is triggered as well, even if it's turned off for a given branch.

Configure rule sets for branches

To modify default rules set, send the following PATCH request:

curl -X 'PATCH' \
'{baseUrl}/api/v2/tenants/{tenantId}/starsystems/{starSystemId}/cicd-configs/{applicationId}/insurer-config' \
-H 'Accept: */*' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json-patch+json' \
-d '{body}'

Where {body} contains an updated configuration in the JSON Patch format. For details about the JSON Patch format, see https://jsonpatch.com/.

Here are example request bodies for particular builds:

  • Server Tests

    Example request body
    [
    {
    "op": "replace",
    "path": "/gunitServerTests/triggerBranchRules",
    "value": {
    "include": [ "*" ],
    "exclude": [ "feature/abc" ]
    }
    }
    ]

    This build will run on all the branches apart from the feature/abc branch.


  • Build Application

    Example request body
    [
    {
    "op": "replace",
    "path": "/buildApplication/triggerBranchRules",
    "value": {
    "include": [ "<default>", "develop", "release/*" ],
    "exclude": [ ]
    }
    }
    ]

    This build will run on the default and develop branches, and on branches that follow the release/* pattern. No branches were excluded.


  • Dockerize Application

    Example request body
    [
    {
    "op": "replace",
    "path": "/dockerizeApplication/triggerBranchRules",
    "value": {
    "include": [ "<default>", "develop", "release/*", "feature/*" ],
    "exclude": [ "feature/abc" ]
    }
    }
    ]

    This build will be run on the default and develop branches and on branches that follow the release/* and feature/* patterns. The Dockerize Application build won't be run on the feature/abc branch.