Pipeline Configuration
Complete reference for pipeline configuration options.
Pipeline Configuration
This page documents all available configuration options for Sluice pipelines.
Configuration Formats
Sluice supports both YAML and JSON configuration formats. YAML is recommended for readability.
YAML Example
name: my-pipeline
description: Build and deploy my application
stages:
- name: source
type: source
config:
repository: https://github.com/org/repo JSON Example
{
"name": "my-pipeline",
"description": "Build and deploy my application",
"stages": [
{
"name": "source",
"type": "source",
"config": {
"repository": "https://github.com/org/repo"
}
}
]
} Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique name for the pipeline |
description | string | No | Human-readable description |
stages | array | Yes | List of stage definitions |
Stage Configuration
Each stage requires the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique name within the pipeline |
type | string | Yes | Stage type (source, build, test, deploy, approve) |
config | object | Yes | Type-specific configuration |
condition | string | No | Condition for running this stage |
timeout | string | No | Maximum duration (e.g., “30m”) |
Stage Names
Stage names must:
- Be unique within the pipeline
- Contain only lowercase letters, numbers, and hyphens
- Start with a letter
- Be no longer than 63 characters
Conditions
Use conditions to control when a stage runs:
stages:
- name: deploy-prod
type: deploy
condition: "branch == 'main'"
config:
# ... Available condition variables:
| Variable | Description |
|---|---|
branch | Git branch name |
tag | Git tag (if triggered by tag) |
event | Trigger event (push, pull_request, manual) |
Timeouts
Set a timeout to prevent stages from running indefinitely:
stages:
- name: build
type: build
timeout: '30m'
config:
# ... Format: <number><unit> where unit is s (seconds), m (minutes), or h (hours).
Note
Default timeout is 1 hour. Maximum timeout is 24 hours.
Source Stage Configuration
- name: source
type: source
config:
repository: https://github.com/org/repo
branch: main
path: /
credentials:
type: ssh
secretRef: git-ssh-key | Field | Type | Required | Description |
|---|---|---|---|
repository | string | Yes | Git repository URL |
branch | string | No | Branch to clone (default: main) |
path | string | No | Subdirectory to use as root |
credentials | object | No | Authentication configuration |
Build Stage Configuration
- name: build
type: build
config:
dockerfile: ./Dockerfile
context: .
image: registry.example.com/my-app
tag: '{{.Version}}'
buildArgs:
NODE_ENV: production
push: true | Field | Type | Required | Description |
|---|---|---|---|
dockerfile | string | Yes | Path to Dockerfile |
context | string | Yes | Build context directory |
image | string | Yes | Image name (without tag) |
tag | string | No | Image tag (default: latest) |
buildArgs | object | No | Docker build arguments |
push | boolean | No | Push to registry (default: true) |
Deploy Stage Configuration
- name: deploy
type: deploy
config:
type: kubernetes
namespace: production
manifests:
- ./k8s/deployment.yaml
- ./k8s/service.yaml
wait: true
timeout: '5m' | Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Deployment type (kubernetes, helm) |
namespace | string | No | Kubernetes namespace |
manifests | array | Yes* | Kubernetes manifest files |
chart | string | Yes* | Helm chart path or repository |
values | object | No | Helm values to override |
wait | boolean | No | Wait for deployment to complete |
timeout | string | No | Deployment timeout |
*Either manifests or chart is required depending on deployment type.
Approve Stage Configuration
- name: approve
type: approve
config:
approvers:
- [email protected]
timeout: '24h'
message: 'Approve deployment to production?' | Field | Type | Required | Description |
|---|---|---|---|
approvers | array | No | List of allowed approvers |
timeout | string | No | Time before auto-rejection |
message | string | No | Message shown to approvers |
Template Variables
Use template variables in your configuration:
| Variable | Description |
|---|---|
{{.Version}} | Pipeline version number |
{{.RunID}} | Current run ID |
{{.Commit}} | Git commit SHA (short) |
{{.Branch}} | Git branch name |
{{.Timestamp}} | Unix timestamp |
Example:
config:
image: registry.example.com/my-app
tag: 'v{{.Version}}-{{.Commit}}' Next Steps
- Stage Types - Detailed stage documentation
- Variables - Environment variables