Based on the idea from the Chromium commit queue to prevent the trunk ever being red while still allowing everyone to work on the trunk branch.
Quickly bootstrap your project with Concourse and the Commit Queue pipeline by running the bootstrap.sh
in your project root.
curl -s https://raw.githubusercontent.com/danrspencer/commit-queue/master/bootstrap.sh | bash /dev/stdin
The bootstrap script assumes you already have Vagrant installed. If you don't use the following commands to install it:
brew cask install virtualbox
brew cask install vagrant
To push using the queue run push-to-queue
. Optionally you can pass command arguments to the script which are forwarded to git commit
, e.g.
p2q -am "adding all the files, setting commit msg and pushing!"
Copy the ci
, scripts
and Makefile
into your project, then run make
in the root of the project to setup the pre-push
hook and the "push to queue" (p2q
) script.
make
To start Concourse run make
inside the ci
folder, this will spin up the Vagrant box and setup the pipeline.
cd ci
make
- A simple
pre-push
hook prevents direct pushes into the trunk branch - The bash script,
p2q
, handles creating and pushes new unique branch - Concourse picks up the new branch validates it by running tests, linting, etc..
- If it passes then merges the commits into master and deletes the branch
- If it fails it leaves branch in place so it can be more easily diagnosed and alerts the team via Slack