Task UtilitiesRelease Management utility tasks
DetailsTokenizerThe task is used to tokenize environment specific configuration: Tokenization based pattern replacementThis task finds the pattern (Optional) Tokenization based on XML / XPathIf Configuration Json filename is provided (optional):
A configuration Json document is provided as an input that contains a section ConfigChanges to provide KeyName the XPath to identify a particular node in the XML document, Attribute name that needs to be set and Value to be set. And this configuration can be maintained for multiple environments.
Below is the sample for the Json document that can be provided as input. There can be multiple sections for each
If the Source filename uses xml namespaces in some nodes, use a generic XPath query in
Or specify the namespace URL and prefix in the config, e.g.
(Optional) Default variables and config changesTo prevent you from having to define variables and config changes for each environment a special "default"-environment can be used in the configuration JSON file. Variables and config changes defined in this special environment will be used in every environment that doesn't explicitly overwrite them.
ParametersBelow is the list of inputs for the task: Source filename* - Source file name that contains the tokens ( Destination filename (optional) - Destination filename that has transformed Source filename. If this is empty, the 'Source filename' will be modified. Configuration Json filename (optional) - Json file that contains environment specific settings in the form XPath, Attribute, Value and values for user-defined variables.
Refer above for the schema/format of the Json filename. If this parameter is not specified, then custom variables mentioned against the build/release are used to replace the tokens that match the regular expression PowerShell++This task lets you write your powershell script inline in the task textbox itself. Shell++This task lets you write your powershell script inline in the task textbox itself. Zip & UnzipThis task lets you create zip files and Unzip archives on a windows agent. RollbackThe task is used to enable execution of rollback scripts for the environments. In case of rollback, you would need to know which of the tasks were executed successfully and which of the tasks failed. You would need to undo/fix the changes made to the environment by those tasks only. Release does not have pre-defined variables that indicate the status of the tasks executed in the job. That makes using an intelligent rollback script difficult. Rollback task facilitates exactly that. You can author a powershell script for reverting/ fixing the changes done to your environment by the deployment. Ensure that Run always* control option is enabled for the rollback task, so that the script can get executed when any of the tasks in the job fail. "Release_Tasks" environment variable shall be set by the task to make the execution status of each of the tasks in the deployment job available for the powershell script. An example to access the task execution information is as follows.
|