krames / build-waiter

Codeship utility that waits for older builds on branch to run before continuing to execute build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build-waiter

build-waiter is a utility which will block until all of the previously run builds for a given branch are completed.

For example, this is a sample output of build-waiter if we were waiting for a build ahead of us.

Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Waiting on build 8f1076e1-3968-43ea-a366-1c97c1cad27d
Resuming build

Usage

build-waiter expects the following environment variables to be set:

Environment Variable Description
CODESHIP_USERNAME Email address of account used for API calls.
CODESHIP_PASSWORD Password of account used for API calls.
CODESHIP_ORGANIZATION Name of the Codeship organization the project resides in.
CI_PROJECT_ID The UUID of the project for the running build.
CI_BUILD_ID The UUID of build running build-waiter.

Note: A dockerized version is available in the codeship/build-waiter-image repo.

Development

This project uses dep for dependency management.

To install/update dep and all dependencies, run:

make setup
make dep

Testing

make test

About

Codeship utility that waits for older builds on branch to run before continuing to execute build

License:MIT License


Languages

Language:Go 80.2%Language:Makefile 15.2%Language:Dockerfile 4.7%