Promote a build
Learn how to use the Build Promoter API to promote a build to another star system class.
All sample requests in this guide include the following path parameters:
Parameter name | Description |
---|---|
tenantId | Tenant ID. |
starSystemId | ID of the logical star system that includes the InsuranceSuite, EnterpriseEngage, or Solr (Advanced Search) applications. |
applicationId | InsuranceSuite, EnterpriseEngage, or Solr application which includes the build. For example: - PC for PolicyCenter - BC for BillingCenter - CC for ClaimCenter - CM for ContactManager - quote-and-buy for CustomerEngage Quote and Buy - producer-engage for ProducerEngage - pc-solr for Solr for PolicyCenter - cc-solr for Solr for ClaimCenter |
branchId | ID of the branch with a build that you want to promote. |
To promote a build, you need to provide information about a given build ID and branch. If you already have this information, you can start the promotion process.
Get a list of branches in a star system
To get a list of all the branches available in a given star system, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenantId}/logicalStarSystems/{starSystemId}/applications/{applicationId}/branches' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
A response contains a JSON object with a list of all the branches available in the given star system.
["refs/heads/master", "refs/heads/development"]
Get a list of builds
To get a list of builds available for a given application, branch, or star system, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenantId}/logicalStarSystems/{starSystemId}/applications/{applicationId}/builds?branchId={branchId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
The branchId
parameter is optional. If you send a request with the branchId
parameter, you'll get a list of builds sorted according to branchId
.
If you don't send the branchId
parameter, you'll get a list of all the builds available for a given application.
A response contains a JSON object with a list of builds available for a given application, branch, or star system.
[
{
"id": "string",
"buildNumber": "string",
"application": "cc",
"branchId": "string",
"planetClasses": ["prod"],
"starSystemClasses": ["prod"]
}
]
Currently, the planetClasses
parameter displays the same values as the starSystemClasses
parameter. The planetClasses
parameter is deprecated and Guidewire recommends using the starSystemClasses
parameter instead.
Get a particular build
To get information about a particular build, send the following GET
request with a buildId
query parameter:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenantId}/logicalStarSystems/{starSystemId}/applications/{applicationId}/builds?branchId={branchId}&buildId={buildId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
The branchId
parameter is optional. If you send both branchId
and buildId
parameters, you'll only get a response with a single build if the provided branchId
parameter matches the branch recorded in the build metadata. Otherwise, you'll get an empty list.
If you don't send the branchId
and buildId
parameters, you'll get a list of all the builds available for a given application.
A response contains a JSON object with information about the given build ID.
{
"id": "string",
"buildNumber": "string",
"application": "cc",
"branchId": "string",
"planetClasses": ["prod"],
"starSystemClasses": ["prod"]
}
Currently, the planetClasses
parameter displays the same values as the starSystemClasses
parameter. The planetClasses
parameter is deprecated and Guidewire recommends using the starSystemClasses
parameter instead.
Promote a build to a target star system
When you have all the required information about a build, you can promote this build.
To promote a build to a target star system, send the following POST
request:
curl -X 'POST' \
'{baseURL}/api/v2/tenants/{tenantId}/logicalStarSystems/{starSystemId}/applications/{applicationId}/promote' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}'
-d '{body}'
Where {body}
contains information about the target star system class and an ID of a build that you want to promote.
{
"targetStarSystemClass": "prod",
"buildId": "cc/1/1"
}
You can only promote the following builds:
- From a star system of
dev
class to a star system ofpreprod
class. - From a star system of
preprod
class to a star system ofprod
class.
You can't promote from dev
directly to prod
.
A response contains a JSON object with a build job ID of the triggered promotion.
{
"promoteBuildJobId": "string"
}
Once the build promotion is completed, you can use the promoted build for deployment in the higher star system class. For details, see IS Deployment API, EE Deployment API, or Deploy Solr instance.
Promote a build regardless of the quality gate status
To promote a build regardless of the quality gate status, you need to have the Insurer Admin privileges. For details, see Access Cloud Platform apps and services.
To promote a build to a target star system, send the following POST
request:
curl -X 'POST' \
'{baseURL}/api/v2/tenants/{tenantId}/logicalStarSystems/{starSystemId}/applications/{applicationId}/promoteWithForce' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}'
-d '{body}'
Where {body}
contains information about the target star system class and an ID of a build that you want to promote.
{
"targetStarSystemClass": "prod",
"buildId": "cc/1/1"
}
A response contains a JSON object with a build job ID of the triggered promotion.
{
"promoteBuildJobId": "string"
}
Once the build promotion is completed, you can use the promoted build for deployment in the higher star system class. For details, see IS Deployment API, EE Deployment API, or Deploy Solr instance.