Code Monkey home page Code Monkey logo

buildkite-ruby-matrix's Introduction

Dockerized Ruby Matrix for Buildkite

This is a Dockerized buildkite setup I use for testing a few open source Ruby projects I maintain. It is a lot more work to get setup, but once it is working it makes building projects really fast. Here is an example from rubocop-rspec:

rubocop-rspec build

That is a 22 second build that ran specs and rubocop on three different versions of Ruby!

This repository mainly exists for my projects so I don't have to copy and paste around this setup. If you do use it on your own project then let me know!

Security

If you do use this, you should add a buildstep via Buildkite's dashboard that looks like this but with your own GPG signature:

gpg --keyserver keyserver.ubuntu.com --recv 1B3C10C4

git_signature=$(git --no-pager show --quiet --pretty='%G?: %GS %GK' HEAD)
expected_signature="U: John Backus <[email protected]> 9A91898D0B0B2FBE"

if [[ "$git_signature" != "$expected_signature" ]]; then
  echo "Expected signature: $expected_signature"
  echo "Actual signature:   $git_signature"
  echo

  git diff --exit-code origin/master -- .gitmodules build .buildkite
fi

This example verifies that no one is modifying the build besides you. This way you can accept third party PRs without it being trivially easy to just start running random binaries on the CI. I definitely wouldn't guarantee that this makes using this CI setup safe, but the Docker container does provide some isolation and this script makes sure you don't change the container.

buildkite-ruby-matrix's People

Contributors

backus avatar

Watchers

 avatar  avatar  avatar

buildkite-ruby-matrix's Issues

Add more ruby versions to the build matrix file

Right now it is just ruby 2.3.1 because I'm just trying to get this submodule thing to work. I would add more ruby versions now but I'm at a cafe and I don't want to burn through all of my battery rebuilding docker images on my laptop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.