Releases: honeycombio/buildevents
Adding JenkinsX env detection, added tests
This release adds support for environment variable detection for Jenkins-X builds to match existing support for Travis-CI, CircleCI, GitLab, etc.
Additionally, some integration tests to verify that commands executed via the cmd
invocation of buildevents
fail or succeed in the way we expect them to.
Fix regression - missing exit status
Previous to the Cobra refactor, when buildevents cmd
would execute a command it would pass along the exit status from that command. In other words, if the command buildevents is running fails, the buildevents command itself will fail with the same exit code. That feature was lost when we switched to the Cobra framework because the standard Run
command has no error return value. Instead Cobra has the RunE
function.
This release fixes the lost feature that when the command being run fails, buildevents will also fail.
Refactor to use Cobra CLI framework
This release represents a refactor of the entire tool to use the spf13/cobra
CLI framework. Thanks to @nelz9999 for contributing this change. Functionality remains the same, though code is better organized for future development.
Included in this release is a small change to the CircleCI polling behavior for the "watch" command to poll the API multiple times when it thinks the build is done just to make sure. There are some cases where the previous behavior premature considered the build done.
Add extra field support, macos builds, minor improvements
This release combines a few commits.
Thanks to @hramos for contributing:
- MacOS builds, suitable for use in build pipelines that run on MacOS.
- Separate AMD64 and 386 linux builds
This addition means that a build running jobs on multiple OS variants can continue to use buildevents to support all portions of the build instead of being restricted to those sections that run on linux.
Thanks to @nelz9999 for contributing:
- Add the facility to augment build spans with additional data such as artifact sizes and other useful information
This addition brings buildevents up out of the "fancy but canned output" world in to sufficient flexibility to really shine at helping teams gain insight into their build processes and history.
Additional fixes:
- better error reporting when polling the CircleCI API errors
- adding the CI provider as a string to the user-agent field for better Honeycomb analysis
Add support for Gitlab
This change augments the CI provider detection to look for Gitlab and automatically add appropriate fields from the environment when building there.
Optionally set a CircleCI API token for private repository builds
When using the watch
command with a private github repository, a valid CirlceCI API key is required to poll the API and get information about the build. This change adds functionality to look in an environment variable for the value of this token, set via the CircleCI UI.
Trim whitespace to protect trace identifiers
In some cases extra whitespace padding could appear around tracing identifiers (trace id, parent id). This extra whitespace would break the trace waterfall. This release trims all arguments of leading or tailing whitespace before using them, resolving this problem.
Add `watch` command for CircleCI
To better catch failing builds, this version introduces a watch
command. This command should be run near the beginning of the build (after setup) and should have nothing depend on it. It will poll the CircleCI API until all other jobs in the build finish then declare the build complete. It will report failure or success based on whether any individual jobs fail.
Adds link to build trace
This release adds two things to the buildevents binary:
- When run in
build
mode (to generate the root span for the trace) it emits a link to the trace to STDOUT. This may be publicized in the build output to make it easy to jump straight to the trace representing this build. - When sending spans to Honeycomb,
buildevents
now identifies itself and its version in theUser-Agent
HTTP header.
Along with these changes are many adjustments to the README, including
- instructions on using the github published binary instead of
go get
to install - typo corrections in the CircleCI instructions
- updates to talk about the link to the trace
clarify version string
This release changes the version string to be the semver numbers alone, without the commit hash as metadata. It was too long and not necessary, given a working github -> circleci -> github artifact loop.