copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2022-08-02 |
DevSecOps, inventory model, inventory, IBM Cloud |
devsecops |
{{site.data.keyword.attribute-definition-list}}
{: #manual-redeployment}
Sometimes, an application running in an environment can crash or behave strangely due to changes in the infrastructure configuration. This can be resolved by redeployment. During redeployment, use the continuous deployment (CD) pipeline to deploy the existing state of the inventory to the target environment by setting a new environment variable for the continuous deployment pipeline. {: shortdesc}
Set the force-redeploy
environment variable with the value as true
while the Manual CD pipeline run is triggered.
{: note}
When you redeploy, the branch in your inventory repository that corresponds to the environment (for example, production and staging) does not contain any new items, and the <target-environment>_latest
tag points to the current commit. The presence of the force-redeploy
flag tells the CD Pipeline to ignore checking any new changes and proceed with the current stage of the inventory.
Here's a quick summary of the procedure followed by the CD Pipeline to redeployment manuallly:
- The CD Pipeline starts and tags the current commit with the pipeline run ID.
- The pipeline picks up the content of the corresponding environment branch from that tag.
- The pipeline calculates the deployment delta between the current commit and the contents of the
<target-environment>_latest
tag. Because the content is identical in this case, the delta is empty. The settingforce-redeploy
makes it possible for the pipeline to continue. - A successful deployment concludes by attaching the
<target-environment>_latest
tag to the commit that you work with. Because the content is identical, no changes are present.