Bring your own deploy
DevOps Intelligence Deploy provides a centralized view of deployment results from multiple tools across your DevOps pipelines. It displays deployment data from tools such as Argo CD and supported cloud endpoints.
Deploy provides the following capabilities:
- View deployment results from multiple tools in one place.
- Access deployment data from Argo CD and supported cloud endpoints.
- Send deployment data from other tools to DevOps Intelligence Deploy by using the provided APIs.
- Monitor deployments across your DevOps environment.
Bringing data into DevOps Intelligence
To bring your own Deploy tools complete the following steps:
- Go to the DevOps Intelligence Tools Configuration page and navigate to the Tokens tab.
- Click on Create Token and give a unique Token name.
- Select Token Type as Deployments, then click on the Create button.
- A new entry will be added to the table in the table entry.
- Click on the vertical ellipsis icon on the respective row and select the view/regenerate token option.
- Copy that token by clicking copy icon in the token field.
To Post Data to the APIs mentioned below, add the service Token ( Create Service Token) to the Authorization header of the request. See the cURL Example for reference
Format
Step 1: TOKEN {the-service-token-from-step1}
Example : TOKEN B8FkfCC3PRVrezteLHp0rPROs2p6yZk_swVLpP_36D7pd5HHLhx7UXqlH_BvpQGo
Step 2: API Reference
API: /services/deployments
URL : https://{devops-intelligence-host}/dash/api/deployments/v4/technical-services/deployments
Parameters:
Parameter | Type | Explanation | Example value |
|---|---|---|---|
Deployment * | BODY | Deployment Data in Json | |
{
{
"id": "6325a4ce1bb54ed5487e5911",
"connections": [],
"deploymentid": "256t767t7",
"template_name": "sampleTechnicalService",
"provider": "gocd",
"providerCode": "gocd",
"tool": "BYOD",
"environment": "string",
"release": "release-2022.09.30",
"status": "Deployed",
"name": "di-dashboard",
"creation_date": "2022-09-12T07:20:50.52Z",
"duration": 10057200,
"endpoint_technical_service_id": "di-dashboard",
"endpoint_hostname": "https://travis.com",
"href": "https://appsvt2-di-release.multicloud-ibm.com/dash/api/deployments/v4/deployments/6325a4ce1bb54ed5487e5911",
"servicehref": {
"deployments": "https://appsvt2-di-release.multicloud-ibm.com/dash/api/deployments/v4/deployments/6325a4ce1bb54ed5487e5911/templates"
},
"providerhref": "https://travis.com/1234",
"technical_service": "sampleTechnicalService",
"technical_service_id": "6325a67a2cf73f8af6382211",
"unique_technical_service_id": "6325a4ce7f9d5f0c984d2d5c",
"application_relationships": [
{
"application_name": "Domino1",
"application_id": "6325b3c277a1e154206b6985",
"relationship_types": [
"uses"
]
}
],
"kcmp_app_href": "",
"kcmp_app_name": "CCM",
"technical_service_tag": {
"SERVICE-UNIQUE-ID": "gocd:https://travis.com:di-dashboard:sampleTechnicalService",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ismetered": true,
"isproduction": true
},
}cURL Example
Request
curl -X POST \
https://peer-core.gravitant.net/dash/api/deployments/v4/technical-services/dash_aws/deployments \
-H 'Authorization: Token zkkh_KmDI2Ib3-6i9eFzdm72zG32UtG4oQqkn63iDUeA5QoMC9RcAxU1Vy5sVFEG' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"creation_date": "2020-07-26T05:06:10.949Z",
"deploymentid": "endpointID_1",
"duration": 2345171,
"name": "AWS",
"provider": "AWS",
"Details": {
"CreationTime": "2020-07-27T13:30:39.181Z"
},
"technical_service_name": "MCMP-DevOps-Intelligence/serviceName",
"technicalserviceoverride": true
}'
Response 200 { "ID": "5f22c301ac17b7ba55644fba","EntityID":"endpointID_1" }
Build request body explained
Field | Data Type | Explanation | Example Value |
|---|---|---|---|
DeploymentID* | string | Object ID | 5d69de78674bf10001ed4ce1 |
Name | string | Name of deployment | 225-mcmp-aws-lamp-job |
Provider* | string | Provider name | AWS |
Status* | string | The deployment status | Deployed, deployed, DEPLOYED, Failed, failed, FAILED |
Duration* | int64 | Time required to run deployment in microseconds | 1005720 |
CreationDate* | string | Date and time of deployment | 2019-10-12T07:20:50.52Z |
ProviderHref | string | Endpoint Url | https://ec2-164-8-1.us-west-2.compute.amazonaws.com/api/v4/job_templates/16/jobs/?id=225 |
Details | map[string]interface{} | Additional details of a template(raw json file contents) | Raw JSON |
technical_service_name* | string | Technical serviceName is an abstraction for deployments group | MCMP-DevOps-Intelligence/devProject1 |
serviceoverride | boolean | Override flag for the service | true |
isProduction | boolean | If deployment is Production | true |