Use Release Parameter in pre-plan step with Deployment Template

Document ID : KB000072160
Last Modified Date : 26/02/2018
Show Technical Document Details
Introduction:
Use case: When we want to create a template to use as a blue print and create deployment plan via it. Now we want this deployment plan to logically follow different logical flow based on parameter values. This value can either be entered by user or via release parameter.

For example: If I want to deploy application A the deployment plan will execute that logic of the deployment but when application B selected it will follow that logic.
Background:
Before we design a blue print template we need to understand various design consideration of the product. The important one are listed below.
  • Pre-Plan Step: The process mapped to this stage is only executed once for a deployment plan. There is no way to re-run the same for already created deployment plan. So any parameter value is considered as snapshot. Ideally this is use to map server, associate artifacts, set release parameter values. For example see screen shot below a process map to pre-plan step had ran when a deployment plan is created.
Pre-Plan Step
Note: As Pre-Plan is ideally use to set release parameter or give concrete values to a future deployment created from it, it doesn't allow you to create a deployment plan if there is any empty release parameter, environment parameter used in the step mapped to this stage.
Environment:
Release Automation: 6.3, 6.4,6.5
Instructions:
Understanding the use case we need a logic so that our deployment changes its logical behavior and we want to create all those deployments via single deployment plan or same template. The ideal step to achieve this is "Pre-Deployment" stage, which as name suggest is doing things before creation of deployment.

Steps to design such a template are listed below.
1: Map the process which for example going to do toggling based on reading values of release parameter to template Pre-Deployment stage. For example if a process do different configuration based on application it will deploy based on release parameter value should be mapped to this stage.
User-added image
2: Now with no value to release-parameter which takes application name you can create a deployment plan, as because this stage is only going to be execute when a deployment is created from this deployment plan giving you opportunity to change the value manually or via manifest file.
User-added image
3: Now you can create a deployment from this deployment plan with different release parameter values either entering in ROC UI or updating same via manifest file.
User-added image