All Projects → toolmantim → bksr

toolmantim / bksr

Licence: ISC License
Run and test your Buildkite pipeline steps locally, just as they'd run in CI (discontinued)

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to bksr

knapsack pro-ruby
Knapsack Pro gem splits tests across parallel CI nodes and makes sure that tests will run in optimal time on each node.
Stars: ✭ 101 (+359.09%)
Mutual labels:  buildkite
k8s-buildkite-plugin
Run any buildkite build step as a Kubernetes Job
Stars: ✭ 37 (+68.18%)
Mutual labels:  buildkite
golang-docker-example
An example of how to run a Golang project in Docker in a Buildkite pipeline
Stars: ✭ 18 (-18.18%)
Mutual labels:  buildkite
rails-docker-parallel-example
An example of how to run Rails CI and test steps in parallel with Docker and Buildkite
Stars: ✭ 19 (-13.64%)
Mutual labels:  buildkite
nodejs-docker-example
An example of how to run a Node.js project in Docker in a Buildkite pipeline
Stars: ✭ 39 (+77.27%)
Mutual labels:  buildkite
artifacts-buildkite-plugin
🆙 Automatically upload and download artifacts
Stars: ✭ 26 (+18.18%)
Mutual labels:  buildkite
ecr-buildkite-plugin
🔐 Login to an AWS ECR registry
Stars: ✭ 24 (+9.09%)
Mutual labels:  buildkite
docker-buildkite-agent
Previous home of buildkite/agent docker image scripts
Stars: ✭ 26 (+18.18%)
Mutual labels:  buildkite-agent
pybuildkite
A Python library for the Buildkite API
Stars: ✭ 29 (+31.82%)
Mutual labels:  buildkite
on-demand
CloudFormation resources for scheduling On-Demand Buildkite Agents with AWS ECS and AWS Fargate
Stars: ✭ 19 (-13.64%)
Mutual labels:  buildkite
docker-compose-buildkite-plugin
🐳⚡️ Run build scripts, and build + push images, w/ Docker Compose
Stars: ✭ 137 (+522.73%)
Mutual labels:  buildkite
docker-buildkite-plugin
🐳📦 Run any build step in a Docker container
Stars: ✭ 90 (+309.09%)
Mutual labels:  buildkite
gitea-buildkite-connector
Connect Gitea & Buildkite
Stars: ✭ 16 (-27.27%)
Mutual labels:  buildkite
buildkite-jobify
👷 Kubekite, but in Rust, using configuration from your repos 🦀
Stars: ✭ 16 (-27.27%)
Mutual labels:  buildkite
buildkite-agent-scaler
📈A lambda for scaling an AutoScalingGroup based on Buildkite metrics
Stars: ✭ 25 (+13.64%)
Mutual labels:  buildkite
junit-annotate-buildkite-plugin
📈 Summarise your test failures as a build annotation
Stars: ✭ 18 (-18.18%)
Mutual labels:  buildkite

⚠️ This project has been discontinued. Please use the Buildkite CLI

bksr - Buildkite Step Runner

NPM package

Run and test your Buildkite pipeline steps locally, just as they'd run in CI, using the buildkite-agent bootstrap itself.

$ bksr
? Choose a pipeline step to run (Use arrow keys)
❯ :shell: Shellcheck
  :sparkles: Lint
  :shell: Tests

Features:

  • Runs any Buildkite command pipeline step, including those that use plugins
  • Won’t accidentally run steps designed for branches (such as 'master' only release steps)
  • Can run dynamic pipelines via STDIN
  • Can run all steps in sequence, including specifying a branch for branch filtering
  • Can run a fresh checkout, emulating a clean CI agent environment

Installation

On macOS using Homebrew:

$ brew install toolmantim/bksr/bksr

Everywhere else:

$ npm i -g bksr

Or, with npx

$ npx bksr

Or, like srsly:

$ alias bksrsly=bksr
$ bksrsly
? Choose a pipeline step to run (Use arrow keys)
❯ :shell: Shellcheck
  :sparkles: Lint
  :shell: Tests

Usage

bksr

Run and test your Buildkite pipeline steps locally, just as they'd run in CI,
using the buildkite-agent itself.

Options:
  --step, -s      Label of the step to run                              [string]
  --all, -a       Run steps that don’t use branch filters              [boolean]
  --branch, -b    Run all steps matching the given branch               [string]
  --pipeline, -p  Path to the pipeline file, or "-" to read from STDIN
                                   [string] [default: ".buildkite/pipeline.yml"]
  --checkout, -c  Run steps in a fresh checkout       [boolean] [default: false]
  --version       Show version number                                  [boolean]
  --help          Show help                                            [boolean]

Requirements

Roadmap

Small stuff

  • Fix examples not showing in --help
  • Homebrew

Bigger stuff

  • Support env var substituion in pipeline.yml (buildkite/agent#765)
  • Support setting env vars based on pipeline.yml
  • Hide build output via header collapsing
  • Local-mode artifact/metadata/pipeline commands
  • Bundling the buildkite-agent binary maybe?

Developing

You can run it locally by invoking lib/bksr.js from the command line:

$ cd ~/some-project
$ ~/path-to-bksr-checkout/bin/bksrc.js

To run the unit and integration tests:

$ docker-compose run --rm tests

Or, you can use bksr itself 😱

$ bin/bksr.js --all

Releasing

Run the following command:

git checkout master && git pull && npm version [major | minor | patch]

The command does the following:

  • Ensures you’re on master and don't have local, un-commited changes
  • Bumps the version number in package.json based on major, minor or patch
  • Runs the postversion npm script in package.json, which:
    • Pushes the tag to GitHub
    • Publishes the npm release
    • Opens the GitHub releases page so you can publish the release notes

Previous artwork

License

See LICENSE (ISC)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].