drone-builds

Read your drone builds from the terminal

Installation

$ gem install drone-builds

Usage

In your ~/.env file, env, your .bashrc, etc.:

DRONE_TOKEN=YoUrdRoneTOkEN
DRONE_SERVER=https://your.ci.server.com
DRONE_OWNER=org-name
DRONE_NAME=repo-name

drone-builds

drone-builds commands:
  drone-builds help [COMMAND]  # Describe available commands or one specific command
  drone-builds kill            # kill a build
  drone-builds list            # list last builds
  drone-builds restart         # restart a build
  drone-builds show            # show a build
  drone-builds version         # version used

drone-builds list

Usage:
  drone-builds list

Options:
  -l, [--limit=N]        # number of builds shown
                         # Default: 10
  -p, [--pull=N]         # pull request ID on GitHub
  -b, [--branch=BRANCH]  # builds on that branch
  -s, [--status=STATUS]  # success / failure / running / killed

list last builds

drone-builds show ID

Usage:
  drone-builds show

Options:
  -f, [--filter=FILTER]  # filter builds output lines
  -c, [--context=N]      # number of lines after filter match
  -l, [--last=N]         # show nth last build
                         # Default: 1
  -p, [--pull=N]         # show last build from pull request ID
  -b, [--branch=BRANCH]  # builds on that branch
  -s, [--status=STATUS]  # success / failure / running / killed

show a build

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Dorian/drone-builds. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

TODO

  • [ ] TravisCI tests
  • [ ] Rubocop in CI
  • [ ] More tests
  • [ ] Normal ENV option
  • [ ] parameter options for ENV variables