⚠️ This release (and all previous releases) are not compatible with Java 9 due to an issue in Kotlin's stdlib. Please use Java 8 in the meantime. #1 has more information.
What's new
-
If a container does not become healthy, batect will now show you the exit code and output from the last health check. For example:
Dependency 'http-server' did not become healthy: The configured health check did not indicate that the container was healthy within the timeout period. The last health check exited with code 1 and output: HTTP 404 Not Found.
-
It's now possible to specify environment variables for a task container on a per-task basis. For example:
tasks: journeyTest: description: Run the journey tests. run: container: build-env command: ./gradlew journeyTest environment: - DATABASE_HOST=app-database
-
It's now possible to pass environment variables from the host (where you execute
./batect
) through to containers. This works both at the container level and when using the new task-level environment variables (see above).For example, to set the value of the
SUPER_SECRET_PASSWORD
variable in the container to the value of theMY_PASSWORD
variable on the host, useSUPER_SECRET_PASSWORD=$MY_PASSWORD
. Substitutions in the middle of values is not supported (eg.SUPER_SECRET_PASSWORD=My password is $MY_PASSWORD
will not work). Be careful when using this - by relying on the host's environment variables, you are introducing inconsistency to how the container runs between hosts, which is something you generally want to avoid.
The sample project has been updated to take advantage of all of the above to build and push a Docker image to Docker Hub after every build.
What's been fixed
- The phrasing of the message shown when a container does not become healthy has been clarified.
- The issue where paths that represent neither files nor directories (eg. a socket like the Docker daemon socket) could not be mounted into a container has been fixed.
Getting started
First time using batect? Take a look at the getting started guide, or the sample project.
How to upgrade from previous versions
Already using batect? To install this update, simply replace the batect
script in your project with the one attached to this release.