kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Fix tests/docker/Dockerfile
Date Sat, 04 Mar 2017 00:40:43 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.2 46e6081eb -> 0b04d4e24


MINOR: Fix tests/docker/Dockerfile

Fix tests/docker/Dockerfile to put the old Kafka distributions in the
correct spot for tests.  Also, run_tests.sh should exit with an error
code if image rebuilding fails, rather than silently falling back to an
older image.

Author: Colin P. Mccabe <cmccabe@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #2613 from cmccabe/dockerfix

(cherry picked from commit 4b1415c109fa75a01a11460aa80f0404baecac51)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/0b04d4e2
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/0b04d4e2
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/0b04d4e2

Branch: refs/heads/0.10.2
Commit: 0b04d4e240c56f70f2a334cdb0d4b7a83d228278
Parents: 46e6081
Author: Colin P. Mccabe <cmccabe@confluent.io>
Authored: Fri Mar 3 16:40:25 2017 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Fri Mar 3 16:40:37 2017 -0800

----------------------------------------------------------------------
 tests/docker/Dockerfile   | 8 ++++----
 tests/docker/run_tests.sh | 8 +++++++-
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/0b04d4e2/tests/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile
index 3a3df32..78b2e32 100644
--- a/tests/docker/Dockerfile
+++ b/tests/docker/Dockerfile
@@ -23,9 +23,9 @@ ADD ssh /root/.ssh
 RUN chmod 600 /root/.ssh/id_rsa
 RUN apt update && apt install -y unzip wget curl jq coreutils openssh-server net-tools
vim openjdk-8-jdk python-pip python-dev libffi-dev libssl-dev
 RUN pip install -U pip && pip install --upgrade cffi ducktape==0.6.0
-RUN mkdir -p "/opt/kafka_2.10-0.8.2.2" && curl "${MIRROR}kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz"
| tar xz --strip-components=1 -C "/opt/kafka_2.10-0.8.2.2"
-RUN mkdir -p "/opt/kafka_2.10-0.9.0.1" && curl "${MIRROR}kafka/0.9.0.1/kafka_2.10-0.9.0.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka_2.10-0.9.0.1"
-RUN mkdir -p "/opt/kafka_2.10-0.10.0.1" && curl "${MIRROR}kafka/0.10.0.1/kafka_2.10-0.10.0.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka_2.10-0.10.0.1"
-RUN mkdir -p "/opt/kafka_2.10-0.10.1.1" && curl "${MIRROR}kafka/0.10.1.1/kafka_2.10-0.10.1.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka_2.10-0.10.1.1"
+RUN mkdir -p "/opt/kafka-0.8.2.2" && curl -s "${MIRROR}kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz"
| tar xz --strip-components=1 -C "/opt/kafka-0.8.2.2"
+RUN mkdir -p "/opt/kafka-0.9.0.1" && curl -s "${MIRROR}kafka/0.9.0.1/kafka_2.10-0.9.0.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka-0.9.0.1"
+RUN mkdir -p "/opt/kafka-0.10.0.1" && curl -s "${MIRROR}kafka/0.10.0.1/kafka_2.10-0.10.0.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka-0.10.0.1"
+RUN mkdir -p "/opt/kafka-0.10.1.1" && curl -s "${MIRROR}kafka/0.10.1.1/kafka_2.10-0.10.1.1.tgz"
| tar xz --strip-components=1 -C "/opt/kafka-0.10.1.1"
 
 CMD service ssh start && tail -f /dev/null

http://git-wip-us.apache.org/repos/asf/kafka/blob/0b04d4e2/tests/docker/run_tests.sh
----------------------------------------------------------------------
diff --git a/tests/docker/run_tests.sh b/tests/docker/run_tests.sh
index cc381cc..11b551f 100755
--- a/tests/docker/run_tests.sh
+++ b/tests/docker/run_tests.sh
@@ -18,6 +18,11 @@
 #   TC_PATHS="tests/kafkatest/tests/streams tests/kafkatest/tests/tools" bash tests/docker/run_tests.sh
 set -x
 
+die() {
+    echo $@
+    exit 1
+}
+
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 TESTS_DIR=`dirname ${SCRIPT_DIR}`
 KAFKA_SRC=`dirname ${TESTS_DIR}`
@@ -40,7 +45,8 @@ docker run --rm -it ${KAFKA_IMAGE} "true"
 if [[ $? != 0 || ${KAFKA_IMAGE_REBUILD} != "" ]]; then
     echo "kafka image ${KAFKA_IMAGE} does not exist. Building it from scratch."
     COMMIT_INFO=$(git describe HEAD)
-    docker build -t ${KAFKA_IMAGE} --label=commit_info=${COMMIT_INFO} ${SCRIPT_DIR}
+    docker build -t ${KAFKA_IMAGE} --label=commit_info=${COMMIT_INFO} ${SCRIPT_DIR} \
+        || die "docker build failed"
 fi
 
 echo "Using kafka image: ${KAFKA_IMAGE}"


Mime
View raw message