Skip to content

Latest commit

 

History

History
77 lines (49 loc) · 4.75 KB

File metadata and controls

77 lines (49 loc) · 4.75 KB
copyright
years
2019, 2024
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 consistent parameter values

{: #setting-values-cli}

{{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}

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.

Before you begin

{: #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

{: #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 environment properties within your delivery pipeline

{: #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.

  1. From the {{site.data.keyword.cloud_notm}} console, click the menu icon hamburger icon, and select Resource List.
  2. Select your toolchain.
  3. From your toolchain's Overview page, on the Delivery pipelines card, click the pipeline that you want to use.
  4. Click the Settings icon gear icon > Configure Stage.
  5. Select the Environment properties tab.
  6. If your API key isn't listed, click + Add property > Secure property, and add your API key.
  7. Click + Add property > Properties file.
  8. Enter buildProperties as the name and build.properties as the value.
  9. Click Save.

Next steps

{: #next-values-cli}

Publish a build record.