Skip to content

Latest commit

 

History

History
337 lines (180 loc) · 10.7 KB

executables.md

File metadata and controls

337 lines (180 loc) · 10.7 KB

Executables

The executable definition files are used to define Flow executables. A workspace can have multiple executable definition files. Each executable definition file can define multiple executables. Each executable definition file must have the extension .flow to be discoverable by Flow. These files can be located anywhere in the workspace directory.


ExecutableDefinition

Type: Object

Fields

Key Type Description
namespace String The namespace of the executable definition. This is used to group executables together.
If not set, the executables in the definition will be grouped into the root (*) namespace.
Namespaces can be reused across multiple definitions.
tags Array (string) A list of tags.
Tags can be used with list commands to filter returned data.
visibility Visibility
executables Array (Executable) A list of executables to be defined in the executable definition.

Visibility

Type: VisibilityType

The visibility of the executables to Flow.
If not set, the visibility will default to public.

public executables can be executed and listed from anywhere.
private executables can be executed and listed only within their own workspace.
internal executables can be executed within their own workspace but are not listed.
hidden executables cannot be executed or listed.


ExecutableDefinitionTemplate

Type: Object

Fields

Key Type Description
data Array (TemplateDataEntry) A list of template data to be used when rendering the executable definition.
artifacts Array (string) A list of files to include when copying the template in a new location. The files are copied as-is.
namespace String The namespace of the executable definition. This is used to group executables together.
If not set, the executables in the definition will be grouped into the root (*) namespace.
Namespaces can be reused across multiple definitions.
tags Array (string) A list of tags.
Tags can be used with list commands to filter returned data.
visibility Visibility
executables Array (Executable) A list of executables to be defined in the executable definition.

Visibility

Type: VisibilityType

The visibility of the executables to Flow.
If not set, the visibility will default to public.

public executables can be executed and listed from anywhere.
private executables can be executed and listed only within their own workspace.
internal executables can be executed within their own workspace but are not listed.
hidden executables cannot be executed or listed.


Executable

Type: Object

Fields

Key Type Description
verb Verb
name String
aliases Array (string)
tags Array (string) A list of tags.
Tags can be used with list commands to filter returned data.
description String
visibility Visibility
type ExecutableTypeSpec

ExecutableTypeSpec

Type: Object

Fields

Key Type Description
exec ExecExecutableType
launch LaunchExecutableType
request RequestExecutableType
render RenderExecutableType
serial SerialExecutableType
parallel ParallelExecutableType

Verb

Type: Verb

Keywords that describe the action an executable performs.
While executables are configured with a single verb, the verb can be aliased to related verbs.
For example, the exec verb can replaced with "run" or "start" when referencing an executable.
This allows users to use the verb that best describes the action they are performing.

Activation verbs: exec, run, start, install, setup
Deactivation verbs: delete, remove, uninstall, teardown, destroy
Launch verbs: open, launch, edit, show, view, render, process, transform, generate


Visibility

Type: VisibilityType

The visibility of the executables to Flow.
If not set, the visibility will default to public.

public executables can be executed and listed from anywhere.
private executables can be executed and listed only within their own workspace.
internal executables can be executed within their own workspace but are not listed.
hidden executables cannot be executed or listed.


Argument

Type: Object

Fields

Key Type Description
envKey String The name of the environment variable that will be assigned the value.
type String
default String The default value to use if the template data is not set.
required Boolean If true, the argument must be set. If false, the default value will be used if the argument is not set.
flag String The flag to use when setting the argument from the command line.
Either flag or pos must be set, but not both.
pos Integer The position of the argument in the command line arguments. Values start at 1.
Either flag or pos must be set, but not both.

Parameter

Type: Object

Fields

Key Type Description
text String A static value to be passed to the executable.
prompt String A prompt to be displayed to the user when collecting an input value.
secretRef String A reference to a secret to be passed to the executable.
envKey String The name of the environment variable that will be assigned the value.

Ref

Type: Ref

A reference to an executable.
The format is <verb> <workspace>/<namespace>:<executable name>.
For example, exec ws/ns:my-flow.

The workspace and namespace are optional.
If the workspace is not specified, the current workspace will be used.
If the namespace is not specified, the current namespace will be used.


Verb

Type: Verb

Keywords that describe the action an executable performs.
While executables are configured with a single verb, the verb can be aliased to related verbs.
For example, the exec verb can replaced with "run" or "start" when referencing an executable.
This allows users to use the verb that best describes the action they are performing.

Activation verbs: exec, run, start, install, setup
Deactivation verbs: delete, remove, uninstall, teardown, destroy
Launch verbs: open, launch, edit, show, view, render, process, transform, generate


ExecExecutableType

Type: Object

Fields

Key Type Description
dir String The directory to execute the command in.
If unset, the directory of the executable definition will be used.
If set to f:tmp, a temporary directory will be created for the process.
If prefixed with ./, the path will be relative to the current working directory.
If prefixed with //, the path will be relative to the workspace root.
Environment variables in the path will be expended at runtime.
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
cmd String
file String
logMode LogMode

LogMode

Type: LogMode


LaunchExecutableType

Type: Object

Fields

Key Type Description
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
app String
uri String
wait Boolean

RequestExecutableType

Type: Object

Fields

Key Type Description
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
method String
url String
body String
headers Map (string -> string)
responseFile RequestResponseFile
transformResponse String
logResponse Boolean
validStatusCodes Array (int)

RequestResponseFile

Type: Object

Fields

Key Type Description
dir String The directory to execute the command in.
If unset, the directory of the executable definition will be used.
If set to f:tmp, a temporary directory will be created for the process.
If prefixed with ./, the path will be relative to the current working directory.
If prefixed with //, the path will be relative to the workspace root.
Environment variables in the path will be expended at runtime.
filename String
saveAs String

RenderExecutableType

Type: Object

Fields

Key Type Description
dir String The directory to execute the command in.
If unset, the directory of the executable definition will be used.
If set to f:tmp, a temporary directory will be created for the process.
If prefixed with ./, the path will be relative to the current working directory.
If prefixed with //, the path will be relative to the workspace root.
Environment variables in the path will be expended at runtime.
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
templateFile String
templateDataFile String

SerialExecutableType

Type: Object

Fields

Key Type Description
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
refs Array (Ref) List of executables references
failFast Boolean

ParallelExecutableType

Type: Object

Fields

Key Type Description
params Array (Parameter) List of parameters to pass to the executable.
args Array (Argument)
refs Array (Ref) List of executables references
maxThreads Integer
failFast Boolean