1.0.0-canary.1 • Published 1 year ago
lavoretto v1.0.0-canary.1
lavoretto
Keep your subworkflows out of your workflows, so you can reuse them.
lavorétto (Italian for "work of little importance or of little effort") is a tiny tool useful when working with Google Cloud Platform Workflows. Here is how it works:
- Write your workflows YAML files without including any subworkflow in them.
- Write your subworkflows in their own directory (e.g.
src/subworkflows
), each subworkflow in its own separate file. - Tell lavoretto which workflow you want to build, and where to get the subworkflows.
Installation
npm install --save-dev lavoretto
Usage
Build a single workflow:
lavoretto \
-i path/to/your/workflow-file \
--subworkflows path/to/your/subworkflows-directory
Build all workflows found in a (possibly nested) directory:
lavoretto \
-i path/to/your/workflows-directory \
--subworkflows path/to/your/subworkflows-directory
Options
Option | Default | Explanation |
---|---|---|
input | src/workflows | Workflow file/directory to build. |
subworkflows | src/subworkflows | Subworkflows directory. |
outdir | dist | Directory where to put the generated workflows. |
header | true | Whether to include a comment at the top of each generated workflow. Use --no-header if you don't want it. |
footer | false | Whether to include a comment at the bottom of each generated workflow. |
See a few more examples in scripts.
Troubleshoot
This tool uses debug for its logs. You can set the environment variable DEBUG=lavoretto:*
to troubleshoot this tool.