...
- Set a key-value pair in the runtime arguments or preferences for the physical pipeline.
- A Custom Action or Hydrator Action can Custom Actions can be run in the first stage of a pipeline and set a key-value argument through a workflow token.
...
At runtime, the "macroFunction" function will perform some computation with the provided arguments: arg1, arg2, and arg3. Note that whitespace is significant between in arguments. The syntax will be replaced with whatever macroFunction evaluates to given the provided arguments.
Currently, there are two support macro functions, logicalStartTime and secureStoresecure.
logicalStartTime
Code Block | ||
---|---|---|
| ||
${logicalStartTime(timeFormat,offset)} |
The logicalStartTime macro function takes in a time format and an optional offset as arguments and uses the logical start time of a pipeline to perform the substitution. For example, if suppose the logical start time of a pipeline starts on January 1, 2016 at midnight run is 2016-01-01T00:00:00 and the following syntax macro is provided:
Code Block | ||
---|---|---|
| ||
${logicalStartTime(yyyy-MM-dd'T'HH-mm-ss,1d-4h+30m)} |
would be substituted with The format is yyyy-MM-dd'T'HH-mm-ss and the offset is 1d-4h+30m before the logical start time. This means the macro will be replaced with 2015-12-31T03:30:00, since the offset translates to 20.5 hours. Therefore, the entire macro evaluates to 20.5 hours before midnight of new years 2016-01-01.
secure
Code Block | ||
---|---|---|
| ||
${secure(key)} |
The secure macro function takes in a single key as an argument and looks up the key's associated string value from the Secure Store. In order to perform the substitution, the key provided as an argument must already exist in the secure store. This is useful for performing a substitution with sensitive data.
For example, for a plugin that connects to a MySQL database, you can configure the "password" property field with:
Code Block | ||
---|---|---|
| ||
${secure(mysql-password)} |
which will pull "mysql-password" from the secure store at runtime.