Writing Workflows
This page explains how to create and structure Kuristo workflow files using YAML syntax.
Basic Structure
A Kuristo workflow defines a set of jobs, each identified by a unique job ID. Jobs contain one or more steps to execute.
Example:
jobs:
job1:
name: simulation
steps:
- run: ./prepare.sh
- run: ./simulate --input data.in
- run: ./postprocess.sh
job1
is the job ID (must be unique within the workflow)
Job Fields
name
(string, optional): Descriptive job name shown in logs and reportsneeds
(list of job IDs, optional): Defines job execution ordersteps
(list, required): Commands or structured actions to runstrategy
: TODO
Step Fields
Each step represents a unit of work (e.g., a script or an action). You can also customize the runtime environment.
Supported step fields:
run
(string): Shell command to executeworking-directory
(string, optional): Directory to run the command inid
(string, optional): Assign unique identified to a stepuses:
(string): Name of the action to run
Example:
jobs:
mesh:
name: Generate mesh
steps:
- run: ./mesh.sh
shell: /bin/bash
workdir: scripts/
Job Dependencies
Use the needs
field to create dependencies between jobs. This controls execution order.
jobs:
prep:
name: Prepare
steps:
- run: ./prepare_inputs.sh
sim:
name: Run Simulation
needs: [prep]
steps:
- run: ./simulate
Jobs without dependencies may run in parallel, depending on available system resources.