Deployment Manager Action Pack (PCK.AUTOMIC_DM)
This action pack can be used to interact with CDA through its webservice to perform certain operations. Simple functions like assigning a deployment package can be executed.
Important! Aratools has been desupported in v12 and replaced by this Action Pack.
Deployment Manager Action Pack v1.3.0
The actions that are contained in this action pack are preinstalled with Automic Continuous Delivery Automation.
Supported Platforms and Prerequisites
For more information about supported platforms, see compatibility matrix
Common PromptSets
PromptSet: PCK.AUTOMIC_DM.PRV.PROMPTSET.RM_CONNECTION_SETTINGS
Name |
Type |
Description |
---|---|---|
*RM URL &UC4RB_RM_HOST# |
TextElement |
Base URL of the RM to connect to. Example:
Mapping: EXT:@global/CallbackURL |
*Username &UC4RB_RM_USERNAME# |
TextElement |
Name of the user to authenticate with Release Manager Examples: One CDA client:
More than one client:
Mapping: EXT:@global/user |
*Password or Token &UC4RB_RM_PASSWORD# |
TextElement |
Password or session token for the RM user Mapping: EXT:@global/token |
PromptSet: PCK.ITPA_SHARED.PRV.PROMPTSET.OVERWRITE_AGENT
Name |
Type |
Description |
---|---|---|
Overwrite Agent &AGENT# |
ComboElement
|
Overwrites the default agent. |
Overwrite Login &LOGIN# |
ComboElement
|
Overwrites the default login. |
This pack includes the following actions:
Add Deployment Target to Component Action
This action adds a Target from the Environment of the Deployment Profile to the Component.
Additional Notes:
- All DeploymentProfileTarget entities are stored before manipulation and restored if there is rollback.
- If the input component is empty, the Target is assigned to all components of the Profile.
- Rollback is enabled for this action.
Archive Entity Action
This action archives objects in CDA/Deployment Manager. It has the same effect as clicking the "Archive" button on an object in CDA. This function can archive multiple objects at once. For additional filters, see CLI Commands for CLI in the Referencedocumentation.
Additional Notes:
Rollback is disabled for this action.
Assign components to deployment targets Action
This action assigns Components to all Targets that match the type of the given Component.
Additional Notes:
- All Deployment Targets are stored before manipulation and are restored if there is rollback.
- If the input Component is empty, the assignment is done for all the components that are related to the Application and the Deployment Profile.
- Rollback is enabled for this action.
Config File Customization Action
This action customizes your configuration files in your component Workflow based on the replacement description in the Deployment Manager.
Additional Notes:
The replacement rules are described as a set of dynamic properties.
-
To set up the config file adaptation, perform the following steps:
- Drag & drop this action to your Workflow.
- Define the Replacement strategy with one of the following parameters:
- ini: updates/creates variables in an INI file.
- java properties: updates/creates variables in a java .properties file.
- xml: updates XML elements or attributes in an XML file. The patterns are matched by xpath-expressions.
- string: arbitrary text patterns (based on exact matches) are replaced by another text.
- regex: arbitrary text patterns (defined by regular expressions) are replaced by another text. The regex search mechanism is gredy, meaning, that the shortest text matching the regular expression is replaced.
- The adaptation process is managed by a set of dynamic properties in the Deployment Manager. The dynamic properties should be defined in a separate namespace on the component. Provide the namespace as parameter 'Config namespace' to this action. The action extracts the mappings from the dynamic properties and carries out all replacements. See below the examples of how the dynamic properties should be defined.
-
Basepath and Relative filepath:
The filepath is a relative location to the 'Basepath'. Internally an absolute path is calculated based on the concatenation of 'Basepath'/'Relative filepath'. Example: to match all INI files in the config subfolder of the Application staging directory (absolute path: c:\temp\myapp\config\*.ini):
Basepath = c:\temp\myapp\
Relative filepath = config\*.ini
You may use * or ** to match multiple directories or files:
-
*: Matches any characters up to the next slash. For example: */*/configfile* collects any files starting with the name "configfile" in any subdirectory with depth 2
-
**: Matches any characters. For example: **/myfolder/myConfig.ini collects any myConfig.ini files in any subdirectory named "myfolder".
-
-
Customization within an archive:
This function can also be used to customize files within zip archives.
Supported file endings are:
- .zip
- .war
- .ear
- .jar
- .sar
- Set the 'Basepath' to the directory containing the zip file.
- Configure the Relative filepath to point to the archive and the config files that should be adopted.
- Set the 'Basepath' to the directory containing the zip file.
- Configure the Relative filepath to point to the archive and the config files that should be adopted.
To adopt a config.xml within an archive called archive.zip:
Basepath:
/path/to/folder/with/the/archive
Relative filepath:
archive.zip/config.xml
- To adopt all config.xml within the archive the Relative filepath must be changed to **/config.xml.
- You may point to a (set of) configuration files inside a .war, .ear, .jar, .zip, .sar file. In that case, the file is temporarily unpacked, changed, and repacked again.
Syntax to match, for example, all INI files in the config subdirectory of a zip file:
myApplicationComponents/myfile.zip/config/*.ini
-
Customization of *.ini-files:
Let usassume, your INI file is as follows:
[GLOBAL]
cmd="javaw" -xXmx1024m -Dsun.locale=true
path=.
title=myTitle
[ENVIRONMENT]
classpath=.;.\ucdj.jar
-
Set up the following dynamic properties in a namespace "/config_adaptation/ini/" in the Deployment Manager:
/config_adaptation/ini/cmd_replace: cmd=>"java" -Xmx512m
/config_adaptation/ini/env_replace: ENVIRONMENT.classpath => .;.\ucdj.jar;.\myLib.jar
/config_adaptation/ini/snd_create: SPLASH.sound=>uc4.wav
/config_adaptation/ini/title_remove: title =>
-
Set the parameters of the runbook function as follows:
- Replacement strategy: INI
- Config namespace: /config_adaptation/ini/
- Basepath: c:\myProduct\
- Relative filepath: myConfig.ini
- Key Value separator: =>
-
Based on this setup, the following replacements are carried out:
- The value of cmd_replace in section [GLOBAL] is updated to value "java" -Xmx512m.
- The value of classpath in section [ENVIRONMENT] is updated to value .;\ucdj.jar;myLib.jar.
- A new variable sound in a new section [SPLASH] is created with the value uc4.wav.
- The value of the variable title in section [GLOBAL] is removed. The variable itself is not removed.
-
-
Customization of java *.properties files:
The key and element characters $, #, !, =, and : in the properties that are added or updated are automatically escaped with a preceding backslash.
Let us assume your java properties file is as follows:
l1.l2.value=myValue
myVariable=myOldValue
-
Set up the following dynamic properties in a namespace
/config_adaptation/java/
in the deployment manager:/config_adaptation/java/replace1: l1.l2.value =>
/config_adaptation/java/replace2: myVariable => myNewValue
-
Set the parameters of the runbook function as follows:
- Replacement strategy: JAVA PROPERTIES
- Config namespace: /config_adaptation/java/
- Basepath: c:\myProduct\
- Relative filepath: myConfig.properties
- Key Value separator: =>
-
Based on this setup, the following replacement is carried out:
The value of myVariable is updated to value myValue. If the variable does not exist, a new one is created.
-
-
Customization of XML files:
This action can update attributes or the content of a node in an XML file. Creating new attributes or nodes is not supported.
Important! Namespaced XML files are not supported.
Let us assume your XML file is as follows (XML declaration is required):
<?xml version="1.0"?>
<connection>
<add key="SMTPServer.Host" value="" />
<add key="SMTPServer.Port" value="25" />
<add key="SMTPServer.User" value="" />
<add key="SMTPServer.Password" value="" />
<add key="SMTPServer.EnableSSL" value="true" />
</connection>
-
Set up the following dynamic properties in a namespace /config_adaptation/xml/ in the deployment manager:
/config_adaptation/xml/smtp_update_port: //connection/add[@key="SMTPServer.Port"]/@value=>80
/config_adaptation/xml/smtp_update_host: //connection/add[@key="SMTPServer.Host"]/@value=>192.168.44.20
/config_adaptation/xml/smtp_update_enable_ssl: //connection/add[@key="SMTPServer.EnableSSL"]=>new content
/config_adaptation/xml/smtp_update_password: //connection/add[@key="SMTPServer.Password"]/@value=>password (Set this dynamic property as Protected)
-
Set the parameters of the runbook function as follows:
- Replacement strategy': XML
- Config namespace: /config_adaptation/xml/
- Basepath: c:\myProduct\
- Relative filepath: web.config
- Key Value separator: =>
-
Based on this set-up, the following replacements are carried out:
- The attribute value of the element with name "SMTPServer.Port" is set to "80"
- The attribute value of the element with key "SMTPServer.Host" is set to "192.168.44.20"
- The content of the element with key "SMTPServer.EnableSSL" is set to "new content"
- The attribute value of the element with key "SMTPServer.Password" is set to "the decrypted password". The password is not included in any report but only in the XML file
<?xml version="1.0"?>
<connection>
<add key="SMTPServer.Host" value="192.168.44.20" />
<add key="SMTPServer.Port" value="80" />
<add key="SMTPServer.User" value="" />
<add key="SMTPServer.Password" value="the decrypted password" />
<add key="SMTPServer.EnableSSL" value="true" >new content</add>
</connection>
-
-
String replacements:
Use the text replacement mechanism to update arbitrary parts of a text file. The patterns are treated as strings, not as regular expressions.
-
Set up the following dynamic properties in a namespace /config_adaptation/string/ in the deployment manager:
/config_adaptation/string/replace1: my-pattern=>myValue
/config_adaptation/string/replace2: DataSource=DATA_SOURCE => DataSource=localhost:1443
-
Set the parameters of the runbook function as follows:
- Replacement strategy: STRING
- Config namespace: /config_adaptation/string/
- Basepath: c:\myProduct\
- Relative filepath: web.txt
- Key Value separator: =>
-
Based on this set-up, the following replacements are carried out:
- All occurrences of the string my-pattern are replaced by myValue
- All occurrences of the string DataSource=DATA_SOURCE is replaced by DataSource=localhost:1433
-
-
Replacements based on regular expressions:
Use the 'regex' replacement mechanism to update arbitrary parts of a text file that is matched by a regular expression pattern.
-
Set up the following dynamic properties in a namespace /config_adaptation/regex/ in the deployment manager:
/config_adaptation/regex/replace1: ^.*example.*$ => my-new-value
/config_adaptation/regex/replace2: DataSource=DATA_SOURCE => DataSource=localhost:1443
-
Set the parameters of the runbook function as follows:
- Replacement strategy: REGEX
- Config namespace: /config_adaptation/string/
- Basepath: c:\myProduct\
- Relative filepath: web.txt
- Key Value separator: =>
-
Based on this setup, the following replacements are carried out:
- All occurrences of the regular expression ^.*example.*$ are replaced by my-new-value
- All occurrences of the string DataSource=DATA_SOURCE are replaced by DataSource=localhost:1433
-
- Rollback is disabled for this action.
Create Deployment Package Action
This action creates a Deployment Package in the specified Release Manager, setting its name, owner, Application, Application version, and the unique revision.
Additional Notes:
- If the revision is not unique, the function stops with an error.
- Rollback is enabled for this action.
Create Deployment Profile Action
This action creates a Deployment Profile for a given Application and Environment. The Application Components will be automatically mapped to matching Targets of the Environment.
Additional Notes:
Rollback is enabled for this action.
Create Deployment Target Action
This action creates a Deployment Target in CDA/Deployment Manager.
Additional Notes:
- The agent assignment and the assignment to an existing environment are optional.
- Rollback is enabled for this action.
Create Environment Action
This action creates an empty Environment object in CDA/Deployment Manager.
Additional Notes:
Rollback is disabled for this action.
Create Package Action
This action creates a Package in the specified Deployment Manager and sets its name and owner.
Additional Notes:
Rollback is enabled for this action.
Delete Multiple Objects Action
This action deletes a single object from the Deployment Manager.
Additional Notes:
- If the object cannot be defined uniquely the function fails.
- Rollback is disabled for this action.
Delete Object Action
This action deletes a single object from the Deployment Manager.
Additional Notes:
- If the object cannot be defined uniquely the function will fail.
- Rollback is disabled for this action.
Execute Application Workflow Action
This action is used to trigger an Application Workflow in the Deployment Manager/CDA.
Additional Notes:
- To set the Workflow to execute right away, leave the Start Date empty (click on the input field label to switch to the developer mode and leave the field empty).
- Rollback is disabled for this action.
- When executing a Workflow containing this action, you can enter prompt variables as key-value pairs in JSON format to overwrite the existing values.
Execute General Workflow Action
This action creates an Execution Object in the RM to execute an AE Workflow with RM properties.
Additional Notes:
Rollback is disabled for this action.
Export XML File Action
This action calls the Export API function of CDA/Deployment Manager and passes an XML file.
Additional Notes:
Rollback is disabled for this action.
Get Dynamic Property Action
This action retrieves the value of a specified Dynamic Property in CDA/Deployment Manager.
Additional Notes:
- You can either specify an object ID or an object name together with object type.
- If you use an object ID, the type can be omitted. This function only works with Dynamic Properties and not with Properties. Example for a dynamic property: "/system/name". Example for a Property: "system_name".
- Rollback is disabled for this action.
Get Property Action
This action gets a single property from a specified object within the Deployment Manager/ARA.
Additional Notes:
- This action only works (Custom) Properties.
- A sample of a Property name: "system_name" which represents the name and is available for every object.
- The action may fail if the defined property is missing.
- If more than one Object is found, a specific error occurs and the function is stopped.
- A Package can only be uniquely identified by their ID, not their name.
- Rollback is disabled for this action.
Import XML File Action
This action calls the Import API function of CDA/Deployment Manager and passes the given XML file.
Additional Notes:
Rollback is disabled for this action.
Move Object to Folder Action
This action sets the folder of a specific object.
Additional Notes:
Rollback is enabled for this action.
Remove Deployment Target from Component Action
This action removes a Target/ all Targets from a specific Components/ all Components
Additional Notes:
- All Deployment Target entities are stored before manipulation and is restored in case of rollback.
- Rollback is enabled for this action.
Remove Deployment Target from Environment Action
This action removes a Target/all Targets from a specific components/all components.
Additional Notes:
Rollback is disabled for this action.
All DeploymentProfileTarget entities are stored before manipulation and will be restored in case of rollback.
Set Dynamic Property Action
This action sets the value of a given Dynamic Property in CDA/Deployment Manager.
Additional Notes:
- This function only works with Dynamic Properties and not with Properties. Example for a dynamic property: "/system/name". Example for a Property: "system_name".
- If the Dynamic Property does not exist, it will be created.
- Rollback is enabled for this action.
Set Owner Action
This action sets the owner of a specific object.
Additional Notes:
Rollback is enabled for this action.
Set Package State Action
This action sets the state of a specified package using its ID.
Additional Notes:
Rollback is enabled for this action.
Set Property Action
This action sets a Property of a specified object in the Deployment Manager/ARA.
Additional Notes:
- This action only works (Custom) Properties.
- A sample of a Property name: "system_name" which represents the name and is available for every object.
- If the object is not uniquely defined the function stops with an error.
- A Package and can only be uniquely identified by their ID, not their name.
- Rollback is disabled for this action.
Synced Execute Application Workflow Action
This action creates an Execution Object in the RM in order to execute an Application Workflow with RM properties.
Additional Notes:
Rollback is disabled for this action.
Synced Execute General Workflow Action
This action creates an Execution Object in the RM in order to execute an AE Workflow with RM properties.
Additional Notes:
Rollback is disabled for this action.
Wait for Execution Completion Action
This action creates an Execution Object in the RM in order to execute an AE Workflow with RM properties.