Pipelines
Execute batch operations from YAMLπYAMLHuman-readable configuration format.View in glossary or JSONπJSONStandard data interchange format.View in glossary pipelineβοΈPipelineAutomated sequence of build/test/deploy steps.View in glossary files for complex automationπ€AutomationReplacing manual processes with software.View in glossary workflows.
Overview
Pipelines allow you to:
- Define multi-stepπ§STEPISO standard for 3D CAD data exchange.View in glossary workflows in declarative YAML or JSON files
- Use variable substitution for dynamic values
- Handle errors gracefully with continue-on-error
- Validate pipelines before execution
- Preview with dry-run mode
Pipeline Structure
A pipeline file has four fields:
name: My Pipeline # Required: pipeline name
description: What it does # Optional: description
variables: # Optional: key-value pairs for substitution
BUCKET: my-bucket
PROJECT_ID: "12345"
steps: # Required: list of steps to execute
- name: Step Name # Required: step display name
command: bucket list # Required: raps subcommand to run
continue_on_error: false # Optional: don't abort on failure (default: false)
condition: "true" # Optional: skip if falsy (empty, "false", or "0")
Each stepβs command is a rapsπΌRAPSRust CLI for Autodesk Platform Services.View in glossary subcommandβΆοΈCommandInstruction executed by a CLI tool.View in glossary string (without the raps prefix). For example, bucket list, object upload my-bucket -f model.rvt, or auth test.
Running Pipelines
# Execute a pipeline
raps pipeline run pipeline.yaml
# Dry-run (show commands without executing)
raps pipeline run pipeline.yaml --dry-run
# Continue past failures
raps pipeline run pipeline.yaml --continue-on-error
# Read pipeline from stdin (parsed as YAML)
cat pipeline.yaml | raps pipeline run -
Variable Substitution
Define variables at the top of your pipeline and reference them in step commands using ${VARIABLE} syntax:
name: Upload Pipeline
variables:
BUCKET: my-project-bucket
MODEL: building.rvt
steps:
- name: Create Bucket
command: "bucket create -k ${BUCKET} -p transient -r US"
continue_on_error: true
- name: Upload Model
command: "object upload ${BUCKET} -f ./models/${MODEL}"
- name: List Objects
command: "object list ${BUCKET}"
Both ${VAR} and $VAR syntax are supported.
Conditional Steps
Steps can include a condition field. If the condition evaluates to falsy (empty string, "false", or "0"), the step is skipped:
steps:
- name: Cleanup Old Data
command: "bucket delete old-bucket -y"
condition: "true" # This step runs
- name: Skip This
command: "bucket list"
condition: "false" # This step is skipped
- name: Also Skipped
command: "bucket list"
condition: "0" # This step is skipped
Error Handling
By default, the pipeline aborts when a step fails. Use continue_on_error on individual steps or the --continue-on-error CLIπ»CLIText-based interface for running commands.View in glossary flagπ©FlagOptional parameter modifying command behavior.View in glossary to continue past failures:
steps:
- name: Delete Old Bucket
command: "bucket delete old-bucket -y"
continue_on_error: true # Pipeline continues if this fails
- name: Create New Bucket
command: "bucket create -k new-bucket -p persistent -r US"
# Pipeline aborts if this fails (default behavior)
Validating Pipelines
Check a pipeline file for syntax errors before running it:
raps pipeline validate pipeline.yaml
Generating a Sample Pipeline
Generate a starter pipeline file:
# Generate YAML (default)
raps pipeline sample
# Generate to a specific file
raps pipeline sample --out-file my-pipeline.yaml
Complete Example
A practical pipeline for bucketπͺ£BucketContainer for storing objects in OSS.View in glossary lifecycle management:
name: Bucket Lifecycle
description: Create a bucket, upload files, and clean up
variables:
BUCKET: raps-demo-bucket
PROJECT_ID: "12345"
steps:
- name: Verify Authentication
command: auth test
- name: List Existing Buckets
command: bucket list
- name: Create Project Bucket
command: "bucket create -k ${BUCKET} -p transient -r US"
continue_on_error: true
- name: Upload Model
command: "object upload ${BUCKET} -f ./models/building.rvt"
- name: List Objects
command: "object list ${BUCKET}"
- name: Delete Bucket
command: "bucket delete ${BUCKET} -y"
continue_on_error: true
Pipeline Output
When a pipeline completes, you get a summary:
Pipeline: Bucket Lifecycle
Create a bucket, upload files, and clean up
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[1/6] Verify Authentication
Command: auth test
β Success
[2/6] List Existing Buckets
Command: bucket list
β Success
...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Pipeline Summary:
β 5 passed, β 1 failed, β 0 skipped
For non-table output formats (JSON, YAML, CSVπCSVTabular data format for spreadsheets.View in glossary), the summary is machine-readable:
raps pipeline run pipeline.yaml --output json
Best Practices
- Use descriptive step names β Makes logs and summaries easier to read
- Set continue_on_error wisely β Only for non-critical steps like cleanup
- Use dry-run first β Validate before executing:
--dry-run - Store secrets in environment β Never put credentials in pipeline files
- Use variables for reusable values β Bucket names, projectπProjectContainer for folders and files within a hub.View in glossary IDs, file paths
Pipeline v2 Features
Pipeline v2 extends the basic format with advanced flow control. All v2 fields are optional and backward compatible with the v1 format described above.
Retry Policy
Automatically retry a step on failure with configurable delay:
steps:
- name: Upload model
command: object upload my-bucket model.rvt
retry:
max_attempts: 3
delay: 5s
Step Timeout
Set a maximum execution time for a step:
steps:
- name: Translate model
command: translate start $URN --wait
timeout: 30m
Conditional Execution
Run or skip steps based on expressions that reference previous step results:
steps:
- name: Notify on success
command: api post /webhooks/notify
if: "${{ steps.translate.exit_code == 0 }}"
- name: Cleanup on failure
command: object delete my-bucket model.rvt
unless: "${{ steps.translate.exit_code == 0 }}"
Parallel Steps
Execute multiple steps concurrently:
steps:
- name: Upload files in parallel
parallel:
- name: Upload model A
command: object upload my-bucket model-a.rvt
- name: Upload model B
command: object upload my-bucket model-b.rvt
For-Each Loops
Iterate over a list of items with optional concurrency control:
steps:
- name: Process models
for_each:
items: ["model-a.rvt", "model-b.rvt", "model-c.rvt"]
variable: MODEL
max_concurrency: 2
template:
name: "Upload ${MODEL}"
command: "object upload my-bucket ${MODEL}"
Expressions
Pipeline expressions use ${{ }} syntax and can reference step results:
${{ steps.<id>.exit_code }}β exit codeπ¦Exit CodeNumeric status returned when a command completes.View in glossary of a previous step${{ env.VARIABLE }}β environment variableπEnvironment VariableConfiguration value passed to applications.View in glossary- Supports comparison operators:
==,!=,>,<,>=,<=
Next Steps
- Examples β More workflowπWorkflowAutomated process triggered by events.View in glossary examples
- Exit Codes β CI/CDπCI/CDAutomated build, test, and deployment pipelines.View in glossary integration