Upon flow execution each action handler gets access to shared context.
​EJS template can be used inside options to pass values from shared context. Please refer to plugin documentation if this feature supported and what options are required.
Example:
version: 1.0.0pipeline:plugin:# Pass "something" from "ctx"contextValue: <%- ctx.something %># Pass "password" from "secrets"secretValue: <%- secrets.password %>
Available actions:
​ctx - assign values to "ctx"
​secret - assign values to "secret"
​summary - report in the end of fbl execution
Assign non-secret values to context ctx
field or its child properties by path. General use case: register shared non-sensitive options that later will be used by actions.
ID: com.fireblink.fbl.context.values
Aliases:
fbl.context.values
context.values
context
ctx
Example 1: Assign values to context root directly:
ctx:# assign to "ctx" directly'$':inline:something: trueelse: false
Example 2: Assign values from file "vars.yml" to field "vars -> files":
ctx:# create hierarchy of objects: "files" inside "vars" that is inside "ctx"$.vars:files:- vars.yml
Example 3: Assign values from file "vars.yml" after inline ones:
ctx:'$':inline:test: truefiles:- vars.yml# specify that files have a priority over inline vars# if not provided inline vars will have priority over filespriority: 'files'
Example 4: Override instead of assigning
ctx:'$.test':inline:test: true# [optional] override everything tha tis inside "test" object with { test: true }# use with cautionoverride: true
Example 5: Push to array
ctx:'$.test':inline: 1# [optional] override everything tha tis inside "test" object with { test: true }# use with cautionoverride: true# [required] if you want to push inline or value(s) from file(s) to targets arraypush: true# [optional] if enambled and value is array its child items will be pushed instead of array itselfchildren: false
Example 6: Find files by mask:
ctx:'$':files:- vars/*.yml
Same as above, but for secrets. All the options will me masked in report to prevent any security leakage.
ID: com.fireblink.fbl.secret.values
Aliases:
fbl.secret.values
secret.values
secrets
secret
Example 1: Assign values to secrets root directly:
secrets:'$':inline:something: trueelse: false
Example 2: Assign values from file "vars.yml" to field "vars -> files":
secrets:$.vars:files:- vars.yml
Example 3: Assign values from file "vars.yml" after inline ones:
secrets:'.':inline:test: truefiles:- vars.yml​# [optional] specify that files have a priority over inline vars# if not provided inline vars will have priority over filespriority: 'files'
Example 4: Override instead of assigning
secrets:'$.test':inline:test: true# [optional] override everything tha tis inside "test" object with { test: true }# use with cautionoverride: true
Example 5: Push to array
secrets:'$.test':inline: 1# [optional] override everything tha tis inside "test" object with { test: true }# use with cautionoverride: true# [required] if you want to push inline or value(s) from file(s) to target's arraypush: true# [optional] if enambled and value is array its child items will be pushed instead of array itselfchildren: false
Example 6: Find files by mask:
secrets:'$':files:- vars/*.yml
Add summary record. All summary records will be printed once the main flow ends.
ID: com.fireblink.fbl.context.summary
Aliases:
fbl.context.summary
context.summary
summary
Example:
summary:# summary record titletitle: Step Title# summary record status# statuses (ignoring case):# - 'created', 'updated', 'passed', 'success', 'ok', 'yes' will be colored in green# - 'deleted', 'failed', 'failure', 'error', 'no' - in red# - 'ignored', 'skipped', 'none' - in yellow# others will have default text colorstatus: Failed# [optional] human readable duration (string)duration: <%- $.duration(1000) %># [optional] additional data associated with record. Not presented in printed table.payload: anything