Plugin allows to invoke any shell command.
Available actions:
Invoice single shell command.
ID: com.fireblink.fbl.exec
Aliases:
fbl.exec
exec
Example:
exec:# executable to invokecommand: 'echo'​# additional executable arguments, note "command" cannot have arguments in its value, just executable alias or path to itargs:- 'test'​# [optional] working directory to run command from.# Default value: flow's folderwd: <%- cwd %>​# [optional] optionsoptions:# [optional] if provided "stdout" will be included inside assigned object to proviced "ctx" and/or "secrets" namestdout: true# [optional] if provided "stderr" will be included inside assigned object to proviced "ctx" and/or "secrets" namestderr: true# [optional] if provided - stdout and stderr will be logged in report and printed to consoleverbose: false​# [optional] assign execution result {code: 0-255, stdout?: string, stderr?: string }assignResultTo: # follows common assignment logic practicies https://fbl.fireblink.com/plugins/common#assign-to​# [optional] push execution result {code: 0-255, stdout?: string, stderr?: string }pushResultTo: # follows common push logic practicies https://fbl.fireblink.com/plugins/common#push-to
Invoke shell script. While it gives a more convinient way to integrate shell scripts into the flow it also makes your flow less platform agnostic.
ID: com.fireblink.fbl.shell
Aliases:
fbl.shell
shell
Example:
shell:# shell executableexecutable: '/bin/bash'​# script to be invokedscript: |-cd /tmptouch test.txt​# [optional] working directory to run script from.# Default value: flow's folderwd: <%- cwd %>​# [optional] optionsoptions:# [optional] if provided "stdout" will be included inside assigned object to proviced "ctx" and/or "secrets" namestdout: true# [optional] if provided "stderr" will be included inside assigned object to proviced "ctx" and/or "secrets" namestderr: true# [optional] if provided - stdout and stderr will be logged in report and printed to consoleverbose: false​# [optional] assign execution result {code: 0-255, stdout?: string, stderr?: string }assignResultTo: # follows common assignment logic practicies https://fbl.fireblink.com/plugins/common#assign-to​# [optional] push execution result {code: 0-255, stdout?: string, stderr?: string }ushResultTo: # follows common push logic practicies https://fbl.fireblink.com/plugins/common#push-to
Allows to invoke custom JavaScript script (ES6). Script has access to all context variables:
cwd
ctx
secrets
parameters
iteration
But also to Node.js require
function and can interact with awailable node modules. Though, it is recomended to use fbl plugins instead.
ID: com.fireblink.fbl.function
Aliases:
fbl.function
function
function()
fn
fn()
Example: Direct Changes
# Action handler expects valid JS function content string.## Note: script is wrapped into async function, so you can "await" promises inside it# if you need to do some long running operations.fn: |-ctx.isWindows = require('os').platform() === 'win32';
Example: Overrides
Alternativelly function can return object that will be used to override entire state of context and parameters fields.
fn: |-return {cwd: '/tmp',ctx: {test: true}}
fn: |-return {secrets: {test: true},parameters: {p1: ctx.p2}}