In IBM UrbanCode Deploy, Environment Gates and Version Statuses can help you define policies restricting which versions of components and applications may be deployed into certain environments. For example, you would use Gates and Statuses to enforce a rule that anything being deployed into Production has passed security reviews. Unlike approvals which act on a specific request, Gates establish checks on the versions of components or applications being deployed.
A Version Status tags a version to indicate that it has some attribute – usually that it has some quality certification. Version Status are easily configurable. They can found by clicking on the top level Settings tab and then again on the Statuses link.
There you’ll see a table that displays all the currently configured version statuses. The required role field sets a restriction on the status that only a user in that role may assign the status to a version. Here I’ve restricted my status so only Developers can add the status “Ready For Testing”, only Quality Assurance can add the status “Quality Verified”, and only Managers can add the statuses “Deployment Ready” and “Necessary Bug Fix”.
After you have your statuses configured your ready to set up your application gates on your environments. This can be done from your application’s Configuration Tab. On the left side select Environment Gates.
For Each Environment you can set version statuses that the version must have in order be able to deploy to that environment. Here only versions that have the status “Ready for Testing” are allowed to be deployed to my UAT environment.
You can also require one or more statuses to be set on a version to deploy it or for one of some number of combinations of status conditions to be set on the version. Here only versions that have either the “Quality Verified” and “Deployment Ready” statuses or the “Necessary Bug Fix” status are allowed to be deployed out to my Prod environment.
In order to set a version status navigate to the component containing the version and then to component’s versions tab and click into the version. You’ll see a table containing the version’s statuses and will be able to add or remove statuses from this interface.
You can also add statuses to versions in component and generic processes using the “Add Status to Version” step in the IBM UrbanCode Deploy Versions plugin. Other tools can assign statuses using the REST or command-line APIs. To create a status from the command line, you would use the udclient tool like this:
udclient -weburl https://ucdeploy.yourcompany.com:8443 addVersionStatus -componentJpetstore-WEB -version 2 -status "DevApproved"