https://github.com/vbfox/buildkite-agent-node
Access BuildKite agent commands from NodeJS
https://github.com/vbfox/buildkite-agent-node
Last synced: 10 months ago
JSON representation
Access BuildKite agent commands from NodeJS
- Host: GitHub
- URL: https://github.com/vbfox/buildkite-agent-node
- Owner: vbfox
- License: mit
- Created: 2019-11-18T21:31:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T22:05:28.000Z (almost 3 years ago)
- Last Synced: 2024-12-02T06:38:10.693Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.6 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `buildkite-agent` for Node.js
[](https://github.com/vbfox/buildkite-agent-node/actions?query=workflow%3ACI) [](https://www.npmjs.com/package/buildkite-agent-node)
Access [Buildkite](https://buildkite.com/) agent commands from Node.js
The [`buildkite-agent`](https://github.com/buildkite/agent) binary has 2 roles: running builds and communicating additional information (Annotations, artifacts, ...) from a build to the agent running the build.
This project target is to provide access to the second set of commands from Node.js without needing the agent binary.
## Supported features
The library is currently in development without any stable release and only a small subset of the agent commands is implemented.
* [x] [`annotate`](https://buildkite.com/docs/agent/v3/cli-annotate)
* [ ] [`artifact`](https://buildkite.com/docs/agent/v3/cli-artifact)
* [x] [`meta-data`](https://buildkite.com/docs/agent/v3/cli-meta-data)
* [x] [`pipeline`](https://buildkite.com/docs/agent/v3/cli-pipeline)
* [ ] Interpolation
## Examples
Adding an annotation:
```typescript
import { annotate, AnnotationStyle } from 'buildkite-agent-node';
annotate('Hello world 👋!', {
context: 'example',
style: AnnotationStyle.Success
});
```
## Users
* [jest-buildkite-reporter](https://github.com/vbfox/jest-buildkite-reporter) Report [Jest](https://jestjs.io/) test results to Buildkite as annotations.
## License
This project is using the [MIT](LICENSE) license.