1.0.0-canary.1 • Published 3 years 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 lavorettoUsage
Build a single workflow:
lavoretto \
  -i path/to/your/workflow-file \
  --subworkflows path/to/your/subworkflows-directoryBuild all workflows found in a (possibly nested) directory:
lavoretto \
  -i path/to/your/workflows-directory \
  --subworkflows path/to/your/subworkflows-directoryOptions
| 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-headerif 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.