Skip to main content

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

FieldTypeRequiredDescription
namestringYesUnique name for the pipeline
descriptionstringNoHuman-readable description
stagesarrayYesList of stage definitions

Stage Configuration

Each stage requires the following fields:

FieldTypeRequiredDescription
namestringYesUnique name within the pipeline
typestringYesStage type (source, build, test, deploy, approve)
configobjectYesType-specific configuration
conditionstringNoCondition for running this stage
timeoutstringNoMaximum 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:

VariableDescription
branchGit branch name
tagGit tag (if triggered by tag)
eventTrigger 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).

Source Stage Configuration

- name: source
  type: source
  config:
    repository: https://github.com/org/repo
    branch: main
    path: /
    credentials:
      type: ssh
      secretRef: git-ssh-key
FieldTypeRequiredDescription
repositorystringYesGit repository URL
branchstringNoBranch to clone (default: main)
pathstringNoSubdirectory to use as root
credentialsobjectNoAuthentication 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
FieldTypeRequiredDescription
dockerfilestringYesPath to Dockerfile
contextstringYesBuild context directory
imagestringYesImage name (without tag)
tagstringNoImage tag (default: latest)
buildArgsobjectNoDocker build arguments
pushbooleanNoPush 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'
FieldTypeRequiredDescription
typestringYesDeployment type (kubernetes, helm)
namespacestringNoKubernetes namespace
manifestsarrayYes*Kubernetes manifest files
chartstringYes*Helm chart path or repository
valuesobjectNoHelm values to override
waitbooleanNoWait for deployment to complete
timeoutstringNoDeployment 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?'
FieldTypeRequiredDescription
approversarrayNoList of allowed approvers
timeoutstringNoTime before auto-rejection
messagestringNoMessage shown to approvers

Template Variables

Use template variables in your configuration:

VariableDescription
{{.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