| copyright |
|
||
|---|---|---|---|
| lastupdated | 2024-04-12 | ||
| keywords | devops insights, setting, values, cli, parameter values, consistent, test, tests, install, app, dashboard, risk, build.properties | ||
| subcollection | ContinuousDelivery |
{{site.data.keyword.attribute-definition-list}}
{: #setting-values-cli}
{{site.data.keyword.DRA_short}} will be discontinued in all regions on February 12, 2027. New {{site.data.keyword.DRA_short}} tool integrations cannot be created after June 12, 2026. However, if the feature has no active usage, it may be discontinued earlier. Learn more {: important}
As part of integrating {{site.data.keyword.deliverypipelinelong}} with {{site.data.keyword.DRA_full}}, you set consistent parameter values to publish data to {{site.data.keyword.DRA_short}}. {: shortdesc}
{{site.data.keyword.DRA_short}} tracks deployment risk based on published test data. When you integrate {{site.data.keyword.DRA_short}} with your {{site.data.keyword.deliverypipeline}}, you are instrumenting {{site.data.keyword.DRA_short}} to gather information from the pipeline. Information that is gathered from the pipeline is presented in {{site.data.keyword.DRA_short}} dashboard to provide visibility into your DevOps process.
{: #prereq-values-cli}
Configure {{site.data.keyword.deliverypipeline}} in your toolchain to build, test, and deploy. You must complete this step before you continue with the integration. For more information, see Configuring {{site.data.keyword.deliverypipeline}}.
You need an API key to integrate with {{site.data.keyword.DRA_short}}. This API key has access to the toolchain, and is used to log in with the {{site.data.keyword.cloud}} command line interface (CLI). For more information, see Managing user API keys.
Install the {{site.data.keyword.cloud_notm}} CLI. For more information, see Getting started with the {{site.data.keyword.cloud_notm}} CLI}}.
{: #setting-environment-properties}
Use the logicalappname and buildnumber parameters consistently for publishing data to {{site.data.keyword.DRA_short}} or for evaluating policies. To set logicalappname and buildnumber values consistently across pipeline stages, you need to set two properties in environment properties in the stage where you do the build.
The values of MY_APP_NAME and MY_BUILD_NUMBER are used in all stages. Use these values when you are integrating with {{site.data.keyword.contdelivery_short}}. For example, set MY_APP_NAME to My First App and set MY_BUILD_NUMBER to $BRANCH:$BUILD_NUMBER.
Configure your pipeline to use these properties across all stages. Save these properties to the build.properties file in your build job and use the following script.
echo "MY_APP_NAME=${MY_APP_NAME}" >> $ARCHIVE_DIR/build.properties
echo "MY_BUILD_NUMBER=${MY_BUILD_NUMBER}" >> $ARCHIVE_DIR/build.properties
{: codeblock}
{: #setting-properties-pipeline}
Next, on the pipeline configuration page, set a property with name buildProperties and the value build.properties. You must set the property name and the value for each stage in your pipeline.
- From the {{site.data.keyword.cloud_notm}} console, click the menu icon
, and select Resource List.
- Select your toolchain.
- From your toolchain's Overview page, on the Delivery pipelines card, click the pipeline that you want to use.
- Click the Settings icon
> Configure Stage.
- Select the Environment properties tab.
- If your API key isn't listed, click + Add property > Secure property, and add your API key.
- Click + Add property > Properties file.
- Enter
buildPropertiesas the name andbuild.propertiesas the value. - Click Save.
{: #next-values-cli}