https://github.com/deanpcmad/buildkiterb
Ruby library for the Buildkite API
https://github.com/deanpcmad/buildkiterb
Last synced: about 1 month ago
JSON representation
Ruby library for the Buildkite API
- Host: GitHub
- URL: https://github.com/deanpcmad/buildkiterb
- Owner: deanpcmad
- License: mit
- Created: 2023-02-06T13:43:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T14:13:38.000Z (about 1 year ago)
- Last Synced: 2025-03-25T02:39:51.194Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 116 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# BuildkiteRB
BuiltkiteRB is a Ruby library for the Buildkite API.
## Installation
Add this line to your application's Gemfile:
```ruby
gem "buildkiterb"
```## Usage
### Set Client Details
Firstly you'll need to create an API Token on [Buildkite](https://buildkite.com/user/api-access-tokens)
and then configure it like below.Buildkite tokens are created for a single organization now, so I recommend setting the `org` the same way,
to tidy up your code.You can optionally set a pipeline too.
```ruby
Buildkite.configure do |config|
config.token = ENV["BUILDKITE_TOKEN"]
config.org = ENV["BUILDKITE_ORG"]
config.pipeline = ENV["BUILDKITE_PIPELINE"]
end```
### Access Token
```ruby
# Get details of the current token
Buildkite::AccessToken.retrieve# Revoke the current token
Buildkite::AccessToken.revoke
```### Organizations
```ruby
# Retrieves an organization
Buildkite::Organization.get slug: "my-org-slug"
```### Pipelines
```ruby
# List all pipelines for an org
Buildkite::Pipeline.list
#=> #