mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
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
21 lines
664 B
Bash
Executable file
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
|
|
|