CLI Reference¶
cli¶
Workflow Command Line Interface.
Usage:
Options:
cli buckets¶
Manage Workflow Buckets.
Usage:
Options:
cli buckets ls¶
List Buckets.
Usage:
Options:
cli buckets ps¶
List work in a bucket.
Usage:
Options:
cli buckets rm¶
Remove work from a bucket.
Usage:
Options:
-s, --status TEXT Filter by status.
-e, --event INTEGER Filter by event.
-t, --tag TEXT Filter by tag.
-p, --parent TEXT Filter by parent.
-f, --force Do not prompt for confirmation
--help Show this message and exit.
cli configs¶
Manage Workflow Configs. Version 2.
Usage:
Options:
cli configs count¶
Count objects per collection.
Usage:
Options:
cli configs deploy¶
Deploy a workflow config.
Usage:
Options:
cli configs ls¶
List Configs.
Usage:
Options:
cli configs ps¶
Get Configs details.
Usage:
Options:
cli configs rm¶
Remove a config.
Usage:
Options:
cli configs stop¶
Stop managers for a Config.
Usage:
Options:
cli configs version¶
Backend version.
Usage:
Options:
cli pipelines¶
Manage Workflow Pipelines.
Usage:
Options:
cli pipelines count¶
Count pipeline configurations per collection.
Usage:
Options:
cli pipelines ls¶
List pipelines.
Usage:
Options:
cli pipelines ps¶
Get pipeline details.
Usage:
Options:
cli pipelines version¶
Backend version.
Usage:
Options:
cli results¶
Manage Workflow Results.
Usage:
Options:
cli results count¶
Count of results per pipeline.
Usage:
Options:
cli results version¶
Show the version.
Usage:
Options:
cli results view¶
View a set of filtered Results.
Usage:
Options:
--status TEXT Filter by status.
--event INTEGER Filter by event.
--tags TEXT Filter by tags.
--limit INTEGER Number of results to view. [default: 10]
--skip INTEGER Number of results to skip. [default: 0]
--details Show detailed information.
--json Output as JSON.
--help Show this message and exit.
cli run¶
Fetch and perform work.
Usage:
Options:
-s, --site TEXT filter work by site. [required]
-t, --tag TEXT filter work by tag.(multiple allowed)
-p, --parent TEXT filter work by parent.(multiple allowed)
-e, --event INTEGER filter work by event.(multiple allowed)
-f, --function TEXT ignores work, runs this function instead
-c, --command TEXT ignores work, runs this command instead
-l, --lives INTEGER RANGE count of work to perform. [default: -1;
x>=-1]
--sleep INTEGER RANGE seconds to sleep between work. [default:
30; 1<=x<=300]
-w, --workspace (FILE | URL | JSON)
workspace config. [default:
/home/runner/.config/workflow/workspace.yml]
--log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
logging level. [default: INFO]
--help Show this message and exit.
cli schedules¶
Manage Workflow Schedules.
Usage:
Options:
cli schedules count¶
Count schedules per collection.
Usage:
Options:
cli schedules deploy¶
Deploy a scheduled pipeline.
Usage:
Options:
cli schedules ls¶
List schedules.
Usage:
Options:
-n, --name TEXT List only Schedules with provided name.
-q, --quiet Only show IDs.
--help Show this message and exit.
cli schedules ps¶
Get schedule details.
Usage:
Options:
cli schedules rm¶
Remove a schedule.
Usage:
Options:
cli schedules version¶
Backend version.
Usage:
Options:
cli workspace¶
Manage Workflow Workspaces.
Usage:
Options:
cli workspace ls¶
List workspaces.
Usage:
Options:
cli workspace purge¶
Purge all local workspaces.
Usage:
Options:
cli workspace read¶
Read workspace config.
Usage:
Options:
cli workspace set¶
Set the active workspace.
Usage:
Options:
cli workspace unset¶
Unset active workspace.
Usage:
Options:
Runners¶
Note
If the work.function
is a Click CLI command, then workflow run
will inherit the CLI default arguments and then merge them with the work.parameters
specified in the work object. This allows for a single CLI to be used for both interactive and non-interactive workflows.
Pipelines CLI¶
Overview¶
This CLI tool provides a command-line interface for interacting with the Pipelines server, enabling users to manage workflow pipelines efficiently. It supports various operations, such as deploying, listing, counting, and managing the lifecycle of pipeline configurations and schedules.
Usage¶
The CLI tool offers the following commands for interacting with the workflow pipelines:
Get server info¶
Get the current version of the pipelines server and info about configuration.
Command: workflow pipelines version
¶
Example output:
{
'client': {
'baseurl': 'http://localhost:8001',
'timeout': 15.0,
'token': None
},
'server': {
'version': '2.6.1'
}
}
List pipelines¶
List all pipelines or scheduled pipelines.
Command: workflow pipelines ls [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output:
Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
┃ ID ┃ Name ┃ Status ┃ Stage ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
│ 65fc4dae5ffde0e8dbeebc61 │ example │ created │ 1 │
│ 65fc4eda5ffde0e8dbeebc65 │ example │ created │ 1 │
│ 65fc50065ffde0e8dbeebc69 │ example │ created │ 1 │
└──────────────────────────┴─────────┴─────────┴───────┘
Count pipelines¶
Count pipelines configurations per collection.
Command: workflow pipelines count [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output:
Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ Name ┃ Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ example │ 3 │
├───────────────────────────┼────────────────────┤
│ Total │ 3 │
└───────────────────────────┴────────────────────┘
Deploy pipeline configurations¶
Deploy a workflow pipeline or schedule from a YAML file.
Command: workflow pipelines deploy <FILENAME> [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output:
Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ IDs ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 65fc7450157ed72595b91a2c │
└────────────────────────────────────────────────┘
Pipeline details¶
Get the whole payload for a pipeline configuration or schedule.
Command: workflow pipelines ps <PIPELINE> <ID> [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output:
Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Pipeline: example ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ { │
│ "id": "65fc69cf5ffde0e8dbeebcc1", │
│ "name": "example", │
│ "current_stage": 1, │
│ "status": "created", │
│ "version": "1", │
│ "creation": 1711040975.1336632, │
│ "start": null, │
│ "stop": null, │
│ "pipeline": { │
│ "runs_on": null, │
│ "services": [], │
│ "steps": [ │
│ { │
│ "name": "daily_monitoring_task", │
│ "work_id": null, │
│ "runs_on": null, │
│ "services": [], │
│ "replicate_deployments": false, │
│ "work": { │
│ "user": "test", │
│ "site": "local", │
│ "function": "guidelines.example.alpha", │
│ "parameters": { │
│ "mu0": "${{ matrix.mu0 }}", │
│ "alpha": "${{ matrix.alpha }}", │
│ "sigma0": 22.0 │
│ }, │
│ "pipeline": "daily-monitoring-task" │
│ }, │
│ "status": "created", │
│ "stage": 1, │
│ "if_condition": "", │
│ "reason": null, │
│ "matrix": null, │
│ "evaluate_on_runtime": false, │
│ "success_threshold": 1.0 │
│ } │
│ ] │
│ }, │
│ "deployments": null, │
│ "user": "test" │
│ } │
└───────────────────────────────────────────────────┘
Stop a pipeline management¶
Kill a running pipeline.
Command: workflow pipelines stop <PIPELINE> <ID> [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output:
Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Stopped IDs ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 65fc69cf5ffde0e8dbeebcc1 │
└────────────────────────────────────────────────┘
Remove pipeline¶
Removes a pipeline, you can only use this command on pipelines with status="cancelled"
Command: workflow pipelines rm <PIPELINE> <ID> [OPTIONS]
¶
Options:¶
--schedule: For interacting with the Schedule API.
Example output: