Skip to content

Getting Started with Pipelines as Code

Pipelines as Code lets you define your CI/CD pipelines using Tekton PipelineRuns and Tasks in files stored directly alongside your source code — versioned, reviewed, and collaborated on just like your application code.

Why Pipelines as Code?

  • Git-native: Pipeline definitions live in a .tekton/ directory in your repo
  • Automatic PR checks: Pipeline runs trigger on pull requests and pushes, with status reported directly on the PR
  • Multi-provider: Works with GitHub, GitLab, Bitbucket, and Forgejo
  • GitOps commands: Control pipelines from PR comments — /retest, /test, /cancel
  • Automatic resolution: Tasks are resolved from your repo, Artifact Hub, or remote URLs

Get Started

The fastest way to try Pipelines as Code:

  1. Install on a kind cluster or OpenShift Local:

    tkn pac bootstrap
  2. Create a repository with a .tekton/ directory containing your PipelineRun YAML.

  3. Open a Pull Request and watch the pipeline run with status checks.

For the full walkthrough, see the Pipelines as Code Getting Started guide.

Learn More