Target Properties are exposed as variables available in Workflow Editor (UI), Shell Plugins, and Script based plugins.
Variable Name | Description |
---|---|
<Target Group Code>_<Property Name> | Value of property defined on current environment and a particular Target Group. |
Note |
---|
Properties on the current build/deploy target instancegroup do not need to be instance-qualified with the Target Group code. |
Unix Shell
The below snippet is an example of to get the FDSVN_URL property for the SAMPLEAPPS instance.
Use ${variable_name} to find value for specific instance.
- myinstance
myTG='SAMPLEAPPS'
myproperty='FDSVN_URL'
mydynamicvar=${
myinstancemyTG}_${myproperty}
SAMPLEAPPS_FDSVN_URL
echo ${mydynamicvar}
Groovy
...
Find value for specific instance
getProperty(propertyName) | ||
Code Block | ||
---|---|---|
| ||
getProperty(propertyName) |
Find property from currently executing instance
Code Block | ||
---|---|---|
| ||
getProperty(FD_TARGET_INSTANCEGROUP_CODE + "_FDJDBC_USER") | ||
Code Block | ||
language | groovy | title |
Lookup a FDSVN_URL for SAMPLEAPPS instance
Code Block | ||
---|---|---|
| ||
svnUrl=""; lookupkey="SAMPLEAPPS" + "_FDSVN_URL"; if (binding.variables.containsKey(lookupkey)) { svnUrl=getProperty(lookupkey);}; return svnUrl; |