pw workflows run
pw workflows run
Run a saved workflow, a local YAML file, or a workflow in a repository
Synopsis
Run a saved workflow, a local YAML file, or a workflow in a repository.
A run reads each input value exactly as it is given. --inputs takes JSON, an object of values by input name, and sends it as written, so write a boolean as true and a number as 8, not "true" or "8".
--input path=value sets one input, over --saved-inputs and --inputs. It can be given again, and a later one wins. A path is an input's name, or a group's name and its input's, as group.name. The inputs of a wizard step, unless its wizard says flatten: false, and of a group with flatten: true, are set by their own names. The value is converted by the type of the input it sets:
- boolean: true or false
- number: a JSON number, such as 8, -2.5 or 1e3
- dropdown: the text as given, unless it names an option whose value is a number or a boolean, which is sent as one. When an option-key picks the options by another input's value, they are the list that value picks, from every value sent, or every list when it isn't sent
- list, multi-dropdown, compute-target, a group, a wizard step that repeats (multi: true) or doesn't flatten, and a cluster or bucket input with multi: JSON, such as '["a","b"]'
- header: an error, since a header takes no value
- every other type, such as string, password, or a single cluster or bucket: the text as given
- a path the workflow doesn't define: the text as given
A cluster or bucket input (compute-clusters, compute-resources or bucket) takes its resource's pw:// URI, never its name alone or its details: pw://<user>/<name>, or pw://<name> for a managed cluster or, in a compute-resources input, a Kubernetes cluster. Your own workspace is pw://<user>/user-workspace, or workspace, user-workspace, pw://workspace, pw://user-workspace or pw://<user>/workspace. Saved inputs that hold a cluster or bucket as its details are sent as its URI.
--input reads the workflow's inputs from the file, from a repository read on this machine, or from the platform for a saved or marketplace workflow. A repository the platform reads for you, a GitLab project or a GitHub repository no credential on this machine can see, takes its values from --inputs instead.
pw workflows run <name-file-or-repo> [flags]Examples
pw workflows run my-workflow
# Run a marketplace workflow by slug
pw workflows run marketplace/my-marketplace-item
# Run a workflow from a local YAML file, or the workflow.yaml (or workflow.yml)
# in a local directory
pw workflows run ./my-workflow.yaml
pw workflows run ./my-workflow
# Run workflow.yaml (or workflow.yml) from the root of a repository
pw workflows run github.com/parallelworks/my-workflow
pw workflows run https://gitlab.example.com/group/my-workflow
# Run a repository at a specific branch, tag, or commit
pw workflows run github.com/parallelworks/my-workflow@v1.2.0
pw workflows run https://gitlab.example.com/group/my-workflow@main
# Run a workflow that lives in a subdirectory, by file or by directory
pw workflows run github.com/parallelworks/workflows/examples/slurm/workflow.yaml
pw workflows run github.com/parallelworks/workflows/examples/slurm@v1.2.0
# Private repositories are read with the credentials already on this machine
# (GH_TOKEN, GITHUB_TOKEN, "gh auth login", "glab auth login", GITLAB_TOKEN, or a
# git credential helper), and otherwise by the platform as your connected account
pw workflows run github.com/parallelworks/my-private-workflow
# Run with input parameters
pw workflows run -i '{"param1": "value1"}' my-workflow
# Run with inputs from a JSON file
pw workflows run -i inputs.json my-workflow
# Run with saved inputs
pw workflows run --saved-inputs my-inputs my-workflow
# Run with saved inputs, overriding individual values from --inputs
pw workflows run --saved-inputs my-inputs -i '{"param1": "value1"}' my-workflow
# Set inputs one at a time, each converted by its input's type: here a number,
# a boolean and a dropdown
pw workflows run --input nodes=4 --input debug=true --input partition=gpu my-workflow
# Set an input inside a group, and a list, which takes JSON
pw workflows run --input resources.cluster=pw://alice/my-cluster --input 'files=["a.txt","b.txt"]' my-workflow
# Set one value over saved inputs and --inputs
pw workflows run --saved-inputs my-inputs -i inputs.json --input nodes=8 my-workflow
# Validate workflow without executing (dry run)
pw workflows run --dry-run my-workflow
# Run with a custom display name
pw workflows run --name "Test run with new params" my-workflow
# Output as JSON
pw workflows run -o json my-workflowOptions
--dry-run Validate only, don't execute
-h, --help help for run
--input stringArray Set the input at path to value, as path=value, converted by the input's type (repeatable; overrides --saved-inputs and --inputs)
-i, --inputs string JSON string or file path with input values, sent as written
--name string Custom display name for the run
-o, --output string Output format (interactive, json, text) (default "interactive")
--saved-inputs string Name of saved inputs on the workflow to load input values from (overridden by --inputs and --input)
--trust Grant the workflow every account variable it declares, without promptingOptions inherited from parent commands
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Overrides PW_PLATFORM_HOST environment variable and the current context's server.
-v, --verbose Enable verbose loggingSEE ALSO
- pw workflows - Manage workflows