Skip to content

KnapsackPro/buildkite-rails-parallel-example-with-knapsack_pro

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 9 commits ahead, 8 commits behind buildkite:main.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Buildkite Rails Parallel Example with Knapsack Pro

Add to Buildkite

This repository is an example on how to easily run 20 parallel testing agents for a Rails application using Buildkite, rbenv and Knapsack Pro.

This repository doesn't actually include a Rails sample application, but has the same CI scripts you would use for a production application. For a Docker based setup, see the Rails Docker Parallel Example with Knapsack Pro.

Files to note:

How does it work?

In the pipeline configuration file the parallelism property for the test step is set to 20. When a build, the step will appear 20 times in the pipeline, each with different environment variables exposed so you can divvy up your test suite accordingly. You can then run 20 agents (on the same machine, or distributed) to work on the 20 jobs in parallel.

steps:
  - name: ":rspec:"
    command: "scripts/ci/setup.sh && scripts/ci/parallel_specs.sh"
    parallelism: 20

See the parallelizing builds guide for more information to create parallelized and distributed builds with Buildkite.

Consult the Knapsack Pro documentation for configuring your database and dependent services to support running parallel steps on the one machine.

You can obtain API key for Knapsack Pro here.

License

See Licence.md (MIT)

About

An example of how to run Rails CI and test steps in parallel with Buildkite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 95.1%
  • Shell 4.9%