IBM Cloud Docs
Setting consistent parameter values

Setting consistent parameter values

You can set consistent parameter values by using other continuous integration and continuous delivery (CI/CD) tools to integrate with IBM Cloud® DevOps Insights. To publish build records, test records, deployment records, and to evaluate gate policies within the same pipeline, you must use the same app name and build number for each stage. You need to pass parameter values logicalappname and buildnumber, and export your toolchain ID to use consistently with DevOps Insights. To use consistent identifiers, set your properties as environment properties.

DevOps Insights tracks deployment risk based on published test data. When you integrate DevOps Insights with your continuous integration and continuous delivery (CI/CD) tool, you're instrumenting DevOps Insights to gather information to provide you with important data for visibility of quality.

Before you begin

Configure your CI/CD tool to build, test, and deploy. You must complete this step before you continue with the integration.

You need an API key for access to the toolchain, and to log in by using the ibmcloud commandline interface (CLI). For more information about creating and managing API keys, see Managing user API keys.

Exporting your toolchain ID

To set the toolchain ID as an environment variable, first identify and save the toolchain ID for the DevOps Insights instance you would like to aggregate the data. For more information about how to find your toolchain ID, see Identifying your toolchain ID.

Use the following steps to go to the Continuous Delivery pipeline in your toolchain and set the toolchain ID as an environment variable:

  1. From the IBM Cloud console, click the Menu icon hamburger icon > Platform Automation > Toolchains.
  2. Select a location to view your toolchains that contain instances of DevOps Insights.
  3. Select your toolchain.
  4. From your toolchain's Overview page, on the Delivery pipelines card, click Delivery Pipeline.
  5. Click the Settings icon gear icon > Configure Stage.
  6. Click the Jobs tab.
  7. Make your changes in the script section. For each stage where you use commands to send build, test, and deployment records, set TOOLCHAIN_ID as the environment variable to the toolchain ID. Export the toolchain ID before they call the command.
export TOOLCHAIN_ID="YOUR_TOOLCHAIN_ID_HERE"

Setting environment properties

Use the logicalappname and buildnumber parameters consistently for publishing data to DevOps Insights or for evaluating policies. Refer to your CI/CD tool documentation to set logicalappname and buildnumber across jobs consistently.

Next steps

Publish a build record by using other CI/CD tools.