What’s new in Buildkite
Posted January 10, 2019 by Lachlan
Happy 2019! To kick off the year, we've got some new agent changes fresh off the press!
When a job is cancelled, the agent receives the instruction and starts to shutdown the running job. The job is given 10 seconds to finish, after which it's terminated. Previously what had happened wasn't clear. We now clearly show that a command was interrupted by a signal:
By default we give cancelled jobs 10 seconds to finish before they terminate. For some things like a Terraform tear-down, this can take a lot longer. We added a config of
cancel-grace-period to customize that value.
# Wait 600 seconds (10 minutes) for cancellation buildkite-agent start --cancel-grace-period 600
Future improvements will allow this to be set at a pipeline or step level.
Checkouts can fail for a variety of reasons which can sometimes leave the git repository in a corrupted state that prevents future checkouts.
The default behaviour for the agent is now to remove the checkout directory if there is a terminal checkout failure.
Windows unfortunately doesn't handle signals like posix systems do, so on Windows the cancellation behaviour was to simple terminate the job. This meant that artifacts weren't uploaded and hooks like
pre-exit didn't run, which left things like
docker-compose without a way to cleanup.
We now use Windows Terminal Process Groups and the
CTRL_BREAK message to emulate signal handling in windows, which now means it should behave much like it's fairer cousins!
Ok this is a small improvement, but it represents our ongoing efforts to take advantage of the neat things that the Windows Terminal team is doing building for Terminal apps.
Currently we recommend that multiple agents on a host are run via your init system (launchd, systemd, etc). The new
--spawn feature allows for multiple parallel agents to be spawned from the one installation.
We're still figuring out how this might fit into the bigger picture, but keen to see how folks use this feature!
We are working with the Datadog team on becoming an official integration. First steps are getting some simple job metrics into Datadog.
You can use the new config
Let us know what you think at https://forum.buildkite.community/t/about-our-datadog-integration/216
We now support loading plugins from within your repository. This lets you vendor plugins to ensure that a third-party can't change them.
steps: - label: "Test with vendored docker plugin" plugins: - "./.buildkite/plugins/docker": image: "hello-world"
Check out https://github.com/buildkite/agent/pull/878 for a bit more context.
We now resolve manually triggered builds with a commit of
HEAD to the actual commit value in $BUILDKITE_COMMIT for your pipeline uploads.
See https://github.com/buildkite/agent/issues/456 for more context. I'm sorry it took us so long!
We discovered a few gnarly bugs where we weren't ssh keyscanning submodules correctly and also a few cases where we weren't cleaning up lingering submodules in the checkout phase. These are now squashed!