You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2019/11/01 03:09:47 UTC
[orc] branch master updated: ORC-564: Change the docker files to
support local builds.
This is an automated email from the ASF dual-hosted git repository.
omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/master by this push:
new 953c00f ORC-564: Change the docker files to support local builds.
953c00f is described below
commit 953c00faabb1821c9b02dfc39c63d2061575bea7
Author: Owen O'Malley <om...@apache.org>
AuthorDate: Fri Oct 25 13:47:06 2019 -0700
ORC-564: Change the docker files to support local builds.
Fixes #444
Signed-off-by: Owen O'Malley <om...@apache.org>
---
docker/README | 25 ++++++++++++++++++-------
docker/centos6/Dockerfile | 12 +++++++-----
docker/centos7/Dockerfile | 12 +++++++-----
docker/centos8/Dockerfile | 12 +++++++-----
docker/debian10/Dockerfile | 12 +++++++-----
docker/debian8/Dockerfile | 12 +++++++-----
docker/debian9/Dockerfile | 12 +++++++-----
docker/run-one.sh | 38 ++++++++++++++++++++++----------------
docker/ubuntu14/Dockerfile | 12 +++++++-----
docker/ubuntu16-clang5/Dockerfile | 12 +++++++-----
docker/ubuntu16/Dockerfile | 12 +++++++-----
docker/ubuntu18/Dockerfile | 12 +++++++-----
12 files changed, 110 insertions(+), 73 deletions(-)
diff --git a/docker/README b/docker/README
index bf03a4c..eee042a 100644
--- a/docker/README
+++ b/docker/README
@@ -1,14 +1,25 @@
-These scripts are useful for testing on different versions of Linux
-assuming that you are running a version of Linux that has docker
-available.
+These scripts are useful for building and testing on different versions of
+Linux.
+
+ORC is currently supported on:
+* CentOS 6, 7, and 8
+* Debian 8, 9, and 10
+* Ubuntu 14, 16, and 18
To test against all of the Linux OSes against Apache's master branch:
-1. ./run-all.sh apache master
+1. cd docker
+2. ./run-all.sh apache master
+
+Using 'local' as the owner will cause the scripts to use the local repository.
+
+The scripts are:
+1. run-all.sh *owner* *branch* - test the given owner's branch on all OSes
+2. run-one.sh *owner* *branch* *os* - test the owner's branch on one OS
+3. reinit.sh - rebuild all of the base images without the image cache
-To run the docker scripts:
-1. cd $os
+A base image for each OS is built using:
+1. cd docker/$os
2. docker build -t orc-$os .
-3. docker run orc-$os
To clean up docker:
1. docker container prune
diff --git a/docker/centos6/Dockerfile b/docker/centos6/Dockerfile
index 6fffbb7..5763ade 100644
--- a/docker/centos6/Dockerfile
+++ b/docker/centos6/Dockerfile
@@ -62,8 +62,10 @@ RUN cd snappy-1.1.3 && \
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake -DSNAPPY_HOME=/usr/local -DPROTOBUF_HOME=/usr/local ../orc && \
+ make package test-out
diff --git a/docker/centos7/Dockerfile b/docker/centos7/Dockerfile
index 2074fde..d343e2d 100644
--- a/docker/centos7/Dockerfile
+++ b/docker/centos7/Dockerfile
@@ -54,8 +54,10 @@ RUN cd snappy-1.1.3 && \
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake -DSNAPPY_HOME=/usr/local ../orc && \
+ make package test-out
diff --git a/docker/centos8/Dockerfile b/docker/centos8/Dockerfile
index 4a6d2c6..6621d82 100644
--- a/docker/centos8/Dockerfile
+++ b/docker/centos8/Dockerfile
@@ -46,8 +46,10 @@ WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
diff --git a/docker/debian10/Dockerfile b/docker/debian10/Dockerfile
index fb73d5b..8574f3c 100644
--- a/docker/debian10/Dockerfile
+++ b/docker/debian10/Dockerfile
@@ -36,8 +36,10 @@ WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
diff --git a/docker/debian8/Dockerfile b/docker/debian8/Dockerfile
index 24145ba..1f5ca2b 100644
--- a/docker/debian8/Dockerfile
+++ b/docker/debian8/Dockerfile
@@ -53,8 +53,10 @@ RUN cd snappy-1.1.3 && \
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake -DSNAPPY_HOME=/usr/local ../orc && \
+ make package test-out
diff --git a/docker/debian9/Dockerfile b/docker/debian9/Dockerfile
index 06a5a50..04312ae 100644
--- a/docker/debian9/Dockerfile
+++ b/docker/debian9/Dockerfile
@@ -36,8 +36,10 @@ WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
diff --git a/docker/run-one.sh b/docker/run-one.sh
index 7688560..6eaad68 100755
--- a/docker/run-one.sh
+++ b/docker/run-one.sh
@@ -25,24 +25,30 @@ function failure {
exit 1
}
-CLONE="git clone $URL -b $BRANCH"
-MAKEDIR="mkdir orc/build && cd orc/build"
VOLUME="--volume m2cache:/root/.m2/repository"
+if [ $GITHUB_USER == "local" ]; then
+ BRANCH=`git status| head -1 | sed -e 's/On branch //'`
+ echo "Started local run for $BRANCH on $OS at $(date)"
+ docker run $VOLUME -v`pwd`/..:/root/orc "orc-$OS" || failure
+else
+ CLONE="git clone $URL -b $BRANCH"
+ MAKEDIR="mkdir orc/build && cd orc/build"
-echo "Started $GITHUB_USER/$BRANCH on $OS at $(date)"
+ echo "Started $GITHUB_USER/$BRANCH on $OS at $(date)"
-case $OS in
-centos6|ubuntu12)
- OPTS="-DSNAPPY_HOME=/usr/local -DPROTOBUF_HOME=/usr/local"
- ;;
-centos7|debian8|ubuntu14)
- OPTS="-DSNAPPY_HOME=/usr/local"
- ;;
-*)
- OPTS=""
- ;;
-esac
-docker run $VOLUME "orc-$OS" /bin/bash -c \
+ case $OS in
+ centos6|ubuntu12)
+ OPTS="-DSNAPPY_HOME=/usr/local -DPROTOBUF_HOME=/usr/local"
+ ;;
+ centos7|debian8|ubuntu14)
+ OPTS="-DSNAPPY_HOME=/usr/local"
+ ;;
+ *)
+ OPTS=""
+ ;;
+ esac
+ docker run $VOLUME "orc-$OS" /bin/bash -c \
"$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
- || failure
+ || failure
+fi
echo "Finished $OS at $(date)"
diff --git a/docker/ubuntu14/Dockerfile b/docker/ubuntu14/Dockerfile
index 008207f..8e66fe1 100644
--- a/docker/ubuntu14/Dockerfile
+++ b/docker/ubuntu14/Dockerfile
@@ -51,8 +51,10 @@ RUN cd snappy-1.1.3 && \
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake -DSNAPPY_HOME=/usr/local ../orc && \
+ make package test-out
diff --git a/docker/ubuntu16-clang5/Dockerfile b/docker/ubuntu16-clang5/Dockerfile
index f317863..67b95a3 100644
--- a/docker/ubuntu16-clang5/Dockerfile
+++ b/docker/ubuntu16-clang5/Dockerfile
@@ -42,8 +42,10 @@ ENV CXX=clang++-5.0
WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
diff --git a/docker/ubuntu16/Dockerfile b/docker/ubuntu16/Dockerfile
index 5eca40b..800e29e 100644
--- a/docker/ubuntu16/Dockerfile
+++ b/docker/ubuntu16/Dockerfile
@@ -36,8 +36,10 @@ RUN apt-get install -y \
WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
diff --git a/docker/ubuntu18/Dockerfile b/docker/ubuntu18/Dockerfile
index 650fa20..6fdda39 100644
--- a/docker/ubuntu18/Dockerfile
+++ b/docker/ubuntu18/Dockerfile
@@ -38,8 +38,10 @@ RUN update-java-alternatives --set java-1.8.0-openjdk-amd64
WORKDIR /root
VOLUME /root/.m2/repository
-CMD git clone https://github.com/apache/orc.git -b master && \
- mkdir orc/build && \
- cd orc/build && \
- cmake .. && \
- make package test-out
+CMD if [ ! -d orc ]; then \
+ git clone https://github.com/apache/orc.git -b master; \
+ fi && \
+ mkdir build && \
+ cd build && \
+ cmake ../orc && \
+ make package test-out
\ No newline at end of file