Skip to content

vdemeester/chisel

Repository files navigation

Chisel & Mallet

Run Tekton PipelineRuns locally with your choice of container backend.

Named to pair with "Dagger" (both builder's tools), honoring Tekton's Greek meaning of "builder/carpenter".

Two Tools, One Goal

Tool Backend Best For
Chisel Dagger Fast iteration with caching, CI environments
Mallet Podman Local development, rootless containers, no daemon

Both tools share the same parser and orchestration logic - only the container execution differs.

Features

  • Parse and execute Tekton PipelineRun, Pipeline, and Task YAML locally
  • Parallel task execution with DAG-based scheduling
  • Full parameter support (string, array, object types)
  • Workspaces, volumes, sidecars, and result passing
  • Identical behavior to cluster execution

Installation

From Source

git clone https://github.com/vdemeester/chisel
cd chisel
make build          # Build both tools
make install        # Install to $GOPATH/bin

Individual Tools

# Chisel only
go install github.com/vdemeester/chisel/cmd/chisel@latest

# Mallet only
go install github.com/vdemeester/chisel/cmd/mallet@latest

Prerequisites

Chisel (Dagger Backend)

  • Dagger (v0.19+)
  • Docker or compatible container runtime

Mallet (Podman Backend)

  • Podman (v4.0+)
  • Podman socket enabled: systemctl --user start podman.socket

Usage

Both tools use the same CLI interface:

# Run a PipelineRun
chisel run pipelinerun.yaml
mallet run pipelinerun.yaml

# Run a Task or Pipeline directly
chisel run task.yaml
mallet run pipeline.yaml

# Pass parameters when running Task/Pipeline directly
chisel run task.yaml --param message="Hello World"
mallet run pipeline.yaml -p greeting="Hi" -p count=5

# Array and object parameters
mallet run task.yaml --param "packages=fmt,strings,os"
mallet run task.yaml --param 'config="host:localhost, port:8080"'

# Specify task definitions directory
chisel run pipelinerun.yaml --tasks=./tasks/

# Debug mode (verbose output)
mallet run pipelinerun.yaml --debug

# Dry run (parse only, no execution)
chisel run pipelinerun.yaml --dry-run

# Output format (pretty, plain, json)
mallet run pipelinerun.yaml --output=json

# Inject local directory as workspace
chisel run build-task.yaml --workspace=source:.

# Multiple workspace overrides
mallet run pipeline.yaml -w source:. -w config:./config

When to Use Which

Use Chisel (Dagger) when:

  • You want aggressive caching between runs
  • Running in CI/CD environments
  • You need Dagger's content-addressed caching
  • Docker is already running

Use Mallet (Podman) when:

  • You prefer rootless containers
  • You don't want a daemon running
  • You're on a system without Docker
  • You want pure local execution

Examples

See the examples/ directory for sample Tekton YAML files.

# Simple pipeline
chisel run examples/simple/hello-pipelinerun.yaml
mallet run examples/simple/hello-pipelinerun.yaml

# Parallel task execution
chisel run examples/simple/parallel-pipelinerun.yaml

# Result passing between tasks
mallet run examples/simple/results-pipelinerun.yaml

# Volume sharing between steps
chisel run examples/simple/volumes-pipelinerun.yaml

# Sidecar containers (e.g., Redis alongside steps)
mallet run examples/simple/sidecar-pipelinerun.yaml

# Matrix builds (multiple parameter combinations)
chisel run examples/simple/matrix-pipelinerun.yaml

# Conditional execution (when clauses)
mallet run examples/simple/when-pipelinerun.yaml

# Remote task loading via resolvers
chisel run examples/resolvers/git-resolver-pipelinerun.yaml
chisel run examples/resolvers/hub-resolver-pipelinerun.yaml

Supported Features

  • Parse PipelineRun, Pipeline, Task YAML
  • Execute steps (image, script, command/args, env, workingDir)
  • Parameter passing (string, array, object types)
  • Inline taskSpec/pipelineSpec support
  • Parallel task execution (DAG-based, respects runAfter)
  • Result capture and passing between tasks
  • Volumes (emptyDir, configMap, secret) with step volumeMounts
  • Workspaces (emptyDir, local directory, PVC)
  • Finally tasks
  • Sidecar execution (auxiliary containers alongside steps)
  • Step timeout and retry
  • Conditional execution (when clauses)
  • stepTemplate defaults
  • Matrix builds
  • Remote resolvers (HTTP, Git, Hub, Bundles)

Architecture

┌──────────────────────────────────────────────────────┐
│  CLI (chisel / mallet)                               │
├──────────────────────────────────────────────────────┤
│  pkg/parser      → Load & validate YAML              │
│  pkg/types       → Tekton data structures            │
│  pkg/orchestrator→ DAG scheduling, matrix, when      │
├──────────────────────────────────────────────────────┤
│  pkg/backend     → Backend interface                 │
│    ├── dagger/   → Chisel: Dagger SDK execution      │
│    └── podman/   → Mallet: Podman API execution      │
└──────────────────────────────────────────────────────┘
         │                           │
         ▼                           ▼
┌─────────────────┐       ┌─────────────────┐
│  Dagger Engine  │       │  Podman Service │
│  (BuildKit)     │       │  (libpod)       │
└─────────────────┘       └─────────────────┘

Tekton Concept Mapping

Tekton Chisel (Dagger) Mallet (Podman)
Task Container.WithExec() Pod with containers
Step Sequential exec Sequential containers
Workspace Directory type Bind mount
Parameter Function argument Environment/script
Result Return value / file /tekton/results/ mount
Sidecar Service binding Container in pod
runAfter DAG dependencies DAG dependencies

Related Projects

License

Apache 2.0

About

Run Tekton PipelineRuns locally using Dagger

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •