Versions Compared

Key

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

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

...

Note

Properties on the current build/deploy target group do not need to be 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.

  • myTG='SAMPLEAPPS'

  • myproperty='FDSVN_URL'

  • mydynamicvar=${myTG}_${myproperty}

    • SAMPLEAPPS_FDSVN_URL

  • echo ${mydynamicvar}

Groovy

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

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;