copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2020-06-24 |
devops insights, publish, deploy, record, cli, deployment, test, tests, app |
ContinuousDelivery |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:tip: .tip} {:note: .note} {:important: .important} {:pre: .pre}
{: #publish-deploy-cli}
Deployment records inform {{site.data.keyword.DRA_short}} about the deployments that are made during the deployment process. This record contains the application name, build ID, environment name, status of the deployment, and more. {:shortdesc}
{: #prereq-deploy-cli}
{: #deploy-cli}
The application name and build ID in the deployment record must match the ones that are used in the build record for a specific build. In the deployment job, use the following script to upload a deployment record. The --env
flag identifies the deployment environment.
#!/bin/bash
#install the DevOps Insights plugin
ibmcloud plugin install -f doi
# Login to IBMCloud if you are not already logged in. Assumes that $API_KEY environment variable has been set as a secured property
ibmcloud login --apikey $API_KEY --no-region
ibmcloud doi deployrecord-publish --logicalappname="$MY_APP_NAME" --buildnumber="$MY_BUILD_NUMBER" --env staging --status pass
{:codeblock}
{: #deploy-frequency-cli}
When the deployment job completes, the pipeline publishes a message to {{site.data.keyword.DRA_short}} that the specified build and app was deployed.
- From the {{site.data.keyword.cloud_notm}} console, click the menu icon , and select Resource List.
- Select your toolchain.
- Click the {{site.data.keyword.DRA_short}} tile.
- Click Deployment Frequency.
{: #next-deploy-cli}