Cloud Services

DevOps Intelligence

Bring your Own Build
Published On Jun 05, 2024 - 11:21 AM

Bring your Own Build

Learn how to integrate build tools to Kyndryl Modern Operations – DevOps Intelligence
In DevOps Intelligence Build, you can access insights into Build Information from multiple tools through a centralized service. Build provides a graphical representation of activity around Builds of Projects & Pipelines. Currently, Travis CI and Jenkins are supported by Build, and you can also post Builds from other tools to DevOps Intelligence Build by utilizing the provided APIs. When data is populated from build tools, the Build page displays the information in a visual format..

Bring Data into DevOps Intelligence

To bring your own Build tools complete the following steps:
  1. Go to the DevOps Intelligence Tools Configuration page and navigate to the Tokens tab.
  2. Click on Create Token and give a unique Token name.
  3. Select Token Type as Build, then click on the Create button.
  4. A new entry will be added to the table in the table entry.
  5. Click on the vertical ellipsis icon on the respective row and select the view/regenerate token option.
  6. Copy that token by clicking copy icon in the token field.
To Post Data to the APIs mentioned below, Add the service Token (see: Create Service Token) to the
Authorization
header of the request. See cURL Example for reference

Format

Step 1: TOKEN {the-service-token-from-step1}
Example :
TOKEN 74h5cR8sETSJRvOFkdbsISY3lsgfNGu_V5aNur4Pxu1Jh8kP0NQBJhuWQsRmGzTX
Step 2:  API Reference
API: /services/builds
URL : https://{devops-intelligence-host}/dash/api/build/v3/technical-services/builds
Parameters:
Parameter
Type
Explanation
Example Value
build *
BODY
Build Data in Json
{ "build_id": "5d69de78674bf10001ed4ce1", "href": "https://spinnaker-jenkins.gravitant.net/11/", "built_at": "2020-02-26T02:42:00.184Z", "duration": 100572000000, "repo_url": "https://github.kyndryl.net/MCMP-DevOps-Intelligence/dash_ws_mesh", "branch": "master", "commit": "d2bff1ef9bed5939d3619cb8f926ab37db6f72b2", "build_engine": "Jenkins", "build_status": "pass", "technical_service_name": "MCMP-DevOps-Intelligence/testservice", "technicalserviceoverride": true }
cURL Example:
Request
curl --location --request POST 'https://peer-core.gravitant.net/dash/api/build/v3/technical-services/builds' \ --header 'Authorization: TOKEN 74h5cR8sETSJRvOFkdbsISY3lsgfNGu_V5aNur4Pxu1Jh8kP0NQBJhuWQsRmGzTX' \ --header 'Content-Type: application/json' \ --data-raw '{ "build_id": "5d69de78674bf10001ed4ce1", "href": "https://spinnaker-jenkins.gravitant.net/job/dash/job/dash_ws_mesh/job/master/11/", "built_at": "2020-02-26T02:42:00.184Z", "duration": 100572000000, "repo_url": "https://github.kyndryl.net/MCMP-DevOps-Intelligence/dash_ws_mesh", "branch": "master", "commit": "d2bff1ef9bed5939d3619cb8f926ab37db6f72b2", "build_engine": "Jenkins", "build_status": "pass", "technical_service_name": "MCMP-DevOps-Intelligence/testservice", "technicalserviceoverride": true }'
Response 200
{ "build_id": "5d69de78674bf10001ed4ce1", "href": "https://spinnaker-jenkins.gravitant.net/job/dash/job/dash_ws_mesh/job/master/11/", "built_at": "2020-02-26T02:42:00.184Z", "build_status": "pass", "duration": 100572000000, "repo_url": "https://github.kyndryl.net/MCMP-DevOps-Intelligence/dash_ws_mesh", "branch": "master", "event_type": "", "commit": "d2bff1ef9bed5939d3619cb8f926ab37db6f72b2", "pull_request_number": "", "build_engine": "Jenkins", "technical_service_tag": null, "team_tag": null, "details": null, "technical_service_name": "MCMP-DevOps-Intelligence/testservice" }
Build Request Body Explained
Field
Data Type
Explanation
Example Value
build_id*
string
Object ID
5d69de78674bf10001ed4ce1
href
string
Page URL
https://peer-core.gravitant.net/dash/api/build/v3/builds/76231
built_at*
string
Build start time In
UTC
2020-05-26T02:42:00.184Z
build_status*
string
The build status
pass, fail, passed, failed
duration*
uint64
Time required to run build in
nanoseconds
100572000000
repo_url
string
Git repository URL
https://github.com/test_servide
branch
string
Branch name
master, validation, testing
event_type
string
The event that triggered the build
push, pull_request, cron, API, etc
commit
string
Git Commit ID
d2bff1ef9bed5939d3619cb8f926ab37db6f72ef
pull_request_number
string
Git Pull Request number
34
build_engine*
string
The name of the build engine
Travis CI, Jenkins, etc
details
string
Additional details if any to be provided with the build(raw json file contents)
Raw JSON
technical_service_name*
string
technicalServiceName is an abstraction for projects, repositories, and pipelines in DevOps intelligence(project, repo, pipeline name)
MCMP-DevOps-Intelligence/testservice
technicalserviceoverride
boolean
Override flag for the technical service
true
Do you have two minutes for a quick survey?
Take Survey