Batect can run on any Buildkite agent that meets Batect's system requirements - chiefly Docker and a JVM.
Buildkite supports disabling command evaluation, which requires all build scripts to be invoked without arguments and take any necessary input as environment variables. This prevents the use of the Batect wrapper script, as it expects to receive the task name and other options as command line options.
There are two solutions to this:
In this scenario, you create multiple shell scripts, one for each step in Buildkite.
For example, let's say you have three steps in Buildkite: one for building, one for testing, and another for packaging. You would need to create a separate script for each of these steps that invokes Batect, for example:
In this scenario, you create a single shell script and invoke it with different environment variable values for each step.
A script that executes the task given in the
BATECT_TASK environment variable is:
Configure this in your Buildkite
pipeline.yml as follows: