Pages

28 August, 2023

XM Cloud Deployment Request & Statuses

In XM Cloud, we can create deployment, start, stop and cancel it in multiple ways. It can be on the Portal, CLI or Deploy API. 

In case of automation, you may be preferred to use CLI. When you create a deployment request, you can execute dotnet sitecore cloud deployment create -id HouQRMmUHaipCyCOynF6el.When you want to know the status of the deployment, you can execute dotnet sitecore cloud deployment info -id 3Gf7uCnabuO75ADYuZbJct.

To view the response in a JSON, you can execute dotnet sitecore cloud deployment info -id 3Gf7uCnabuO75ADYuZbJct --json.

{
"organizationId": "org_xxxxxxxxxxxxxx",
"projectId": "xxxxxxxxxxxxxxxxxxxxx",
"environmentId": "xxxxxxxxxxxxxxxxxxxxxxx",
"id": "xxxxxxxxxxxxxxxxxxxt",
"startedAt": "2023-08-25T18:34:24.9067021Z",
"completedAt": null,
"provisioningStatus": 2,
"provisioningStartedAt": "2023-08-25T18:34:25.2341282Z",
"provisioningCompletedAt": "2023-08-25T18:34:25.569189Z",
"provisioningLastFailureMessage": null,
"buildStatus": 2,
"buildStartedAt": "2023-08-25T18:34:25.2837078Z",
"buildCompletedAt": "2023-08-25T18:36:38.9231501Z",
"buildLastFailureMessage": null,
"deploymentStatus": 1,
"deploymentStartedAt": "2023-08-25T18:36:40.0852865Z",
"deploymentCompletedAt": null,
"deploymentLastFailureMessage": null,
"postActionStatus": 0,
"postActionStartedAt": null,
"postActionCompletedAt": null,
"postActionLastFailureMessage": null,
"calculatedStatus": 1,
"createdBy": "nehemiah",
"createdAt": "2023-08-25T18:34:24.8047331Z",
"triggerMessage": "Deployment created by nehemiah"
}

There are various status fields in the response. 

Stages Field Name Comments
Provisioning provisioningStatus Responsible for creating hosting infrastructure
Build buildStatus Responsible for building source code
Deployment deploymentStatus Responsible for deploying built artifacts to hosting infrastructure
Post Actions postActionStatus After deployment tasks
Vercel vercelStatus Not available in Sitecore.DevEx.Extensibility.XMCloud.1.1.30. Present in Deploy API
Overall Status calculatedStatus Overall status of the deployment requset

Each status field has following mapping. 

Status Explanation
0 NotStarted
1 InProgress
2 Complete
3 Failed
 

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }