Skip to content

buildkite/jenkins-to-buildkite

Repository files navigation

Jenkins to Buildkite Migration Example

Build status

Example repository showing how to migrate a Jenkins pipeline to Buildkite, used in the blog post Migrating a Jenkins Pipeline to Buildkite.

Quick Start

1. Clone the Repository

git clone https://github.com/buildkite/jenkins-to-buildkite.git
cd jenkins-to-buildkite

2. Start Jenkins with Docker Compose

docker-compose up

Jenkins will be available at http://localhost:8080 (username: admin, password: admin).

3. Understanding the Pipeline Conversion

This repository demonstrates converting a 92-line Jenkins pipeline to a 36-line Buildkite pipeline:

Jenkins Pipeline (app/Jenkinsfile):

  • Uses matrix builds for Node.js 20 and 22
  • Runs install → (lint + test in parallel) → build
  • Manages workspace state between stages
  • Uses plugins for features like ANSI color output

Buildkite Pipeline (.buildkite/pipeline.yml):

  • Same functionality with YAML configuration
  • Uses depends_on for explicit step dependencies
  • Each step gets fresh workspace (runs install separately)
  • Built-in features replace most Jenkins plugins
  • Uses YAML aliases to reduce duplication

Key Differences

Aspect Jenkins Buildkite
Step Execution Sequential by default Parallel by default
State Management Shared workspace Fresh workspace per step
Agent Targeting Push-based (labels) Pull-based (queues)
Configuration Groovy DSL YAML
Plugins Java-based, shared Shell-based, per-pipeline

Repository Structure

├── app/                    # Sample Node.js application
│   ├── Jenkinsfile        # Original Jenkins pipeline (92 lines)
│   ├── package.json       # Node.js dependencies and scripts
│   └── ...
├── .buildkite/
│   └── pipeline.yml       # Converted Buildkite pipeline (36 lines)
├── docker-compose.yml     # Jenkins setup for local testing
└── jenkins.yaml           # Jenkins configuration as code

Running the Pipelines

Jenkins: Push changes to trigger the Jenkins pipeline, or run manually from the web UI.

Buildkite: Connect your Buildkite account and agents to run the same workflow with the .buildkite/pipeline.yml configuration.

Both pipelines produce the same results: linted code, test coverage reports, and built static files.

About

An example of how to migrate a Jenkins pipeline to Buildkite.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •