| copyright |
|
||
|---|---|---|---|
| lastupdated | 2026-03-30 | ||
| keywords | devops insights, publish, build, record, cli, test, tests, app | ||
| subcollection | ContinuousDelivery |
{:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:tip: .tip} {:note: .note} {:important: .important} {:pre: .pre}
{: #publish-build-cicd}
{{site.data.keyword.contdelivery_short}} will be discontinued in the following regions on 10 April 2026: eu-es and jp-osa. This discontinuation also applies to any features provided within the service, including Code Risk Analyzer and {{site.data.keyword.DRA_short}}. Learn more {: important}
{{site.data.keyword.contdelivery_short}} will be discontinued in the following regions on 12 February 2027: au-syd, ca-mon, ca-tor, us-east. Code Risk Analyzer and {{site.data.keyword.DRA_short}} will also be deprecated in all regions on that date. However, if a region has no active usage of these features, the features in that region may be discontinued earlier and stop accepting new instances. Learn more {: important}
You can publish a build record by using other continuous integration and continuous delivery (CI/CD) tools with the {{site.data.keyword.Bluemix_notm}} command line interface (CLI) to integrate with {{site.data.keyword.DRA_full}}. Build records notify {{site.data.keyword.DRA_short}} when a build is complete. This record contains the application name, branch, build ID, reference to Git repo, and other fields. You must publish build records to view any test records, deployment records, or evaluate policies in {{site.data.keyword.DRA_short}}. {: shortdesc}
{: #prereq-build-cicd}
Before you publish a build record, you must set consistent parameter values. For more information, see Setting consistent parameter values by using other CI/CD tools.
{: #build-cicd}
In a build job, use the following script to upload a build record. Use the buildrecord-publish command to upload a build record.
#!/bin/bash
#install the latest version of DevOps Insights plugin
ibmcloud plugin install -f doi
# Log in to IBM Cloud if you are not already logged in. Assumes that $API_KEY environment variable has been set
ibmcloud login --apikey $API_KEY --no-region
# Please set variable $GIT_BRANCH, $GIT_URL and $GIT_COMMIT for better build record data
# Assumes you have set $MY_APP_NAME and $MY_BUILD_NUMBER as described earlier
ibmcloud doi buildrecord-publish --logicalappname="$MY_APP_NAME" --buildnumber="$MY_BUILD_NUMBER" --branch $GIT_BRANCH --repositoryurl $GIT_URL --commitid $GIT_COMMIT --status pass{: codeblock}
The status field takes the pass or fail values.
{: tip}
{: #build-frequency-cicd}
When this build job completes, your CI/CD tool publishes a message to {{site.data.keyword.DRA_short}} that a build is complete. You can view the build record on the Build Frequency page. To view the Build Frequency page, use the following steps.
- From the {{site.data.keyword.cloud_notm}} console, click the Menu icon
> Platform Automation > Toolchains.
- Select your toolchain.
- From your toolchain's Overview page, on the IBM Cloud tools card, click {{site.data.keyword.DRA_short}}.
- Click Build Frequency.
{: #next-build-cicd}
Publish a deployment record by using other CI/CD tools.