Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Environment Instance property variables are Target Properties are exposed as variables available in Workflow Editor (UI), Shell Plugins, and Script based plugins.

Variable Name

Description

<Instance

<Target Group Code>_<Property Name>

Value of property defined on current environment and a particular

instance

Target Group.

A Workflow is executed for specific

Environment and Instance, so this value is for executing Environment Instance

a Environment. The value comes from the target defined by the currently executing Environment and the given Target Group.

If the Project has overridden the value for a specific Property, that overridden value is returned.


Note

Properties on the current build/deploy target

instance

group 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 of property for the SAMPLEAPPS instance.    

...

Use ${variable_name} to find value for specific instance.

  • myinstance

    myTG='SAMPLEAPPS'

  • myproperty='FDSVN_URL'

  • mydynamicvar=${

    myinstance

    myTG}_${myproperty}

    • SAMPLEAPPS_FDSVN_URL

  • echo ${mydynamicvar}

Groovy

...

...

Find value for specific instance
getProperty(propertyName)
Code Block
title
languagegroovy
getProperty(propertyName)
Find property from currently executing instance
Code Block
languagegroovy
getProperty(FD_TARGET_INSTANCEGROUP_CODE + "_FDJDBC_USER")
Code Block
languagegroovy
title

Lookup a FDSVN_URL for SAMPLEAPPS instance
Code Block
languagegroovy
svnUrl=""; lookupkey="SAMPLEAPPS" + "_FDSVN_URL"; if (binding.variables.containsKey(lookupkey)) { svnUrl=getProperty(lookupkey);}; return svnUrl;