logstash/ci/docker_integration_tests.sh
Jake Landis 1340f2eee0 Introduce docker for CI builds.
This commit includes:
* A base Dockerfile and script to push to a Docker repo
* A per-build Dockerfile (derived from the base)
* Updates to the test scripts to allow for more parallel builds
* Docker wrappers for the tests scripts
* Update for the integration test readme to manually run the tests
* Clean up the output of the Java tests
* Remove offline tag for tests (no longer needed that we don't use docker dependent services)

This commit does NOT include:
* Changes needed for the CI system to use Docker

Fixes #8223
2017-09-14 18:55:41 +00:00

21 lines
664 B
Bash
Executable file

#!/bin/bash -i
#Note - ensure that the -e flag is NOT set, and explicitly check the $? status to allow for clean up
if [ -z "$branch_specifier" ]; then
# manual
IMAGE_NAME="logstash-integration-tests"
else
# Jenkins
IMAGE_NAME=$branch_specifier"-"$(date +%s%N)
fi
echo "Running Docker CI build for '$IMAGE_NAME' "
docker build -t $IMAGE_NAME .
exit_code=$?; [[ $exit_code != 0 ]] && exit $exit_code
docker run -t --rm $IMAGE_NAME ci/integration_tests.sh $@
exit_code=$?
[[ $IMAGE_NAME != "logstash-integration-tests" ]] && docker rmi $IMAGE_NAME
echo "exiting with code: '$exit_code'"
exit $exit_code #preserve the exit code from the test run