Skip to content

Commit

Permalink
ORC-1241: Use apache/orc-dev DockerHub repository in Docker tests
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
This PR aims to use `apache/orc-dev` DockerHub repository in Docker tests.

### Why are the changes needed?
https://issues.apache.org/jira/browse/INFRA-23534
We should utilize the prebuilt image

### How was this patch tested?
Manually.

Closes apache#1212 from williamhyun/usedocker.

Authored-by: William Hyun <william@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
williamhyun authored and cxzl25 committed Jan 11, 2024
1 parent ec7a4d2 commit 05a4238
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
10 changes: 10 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
* Debian 10 and 11
* Ubuntu 18, 20 and 22

## Pre-built Images

Apache ORC community provides a set of pre-built docker images and uses it during testing.

docker pull apache/orc-dev:ubuntu22

You can find all tags here.

https://hub.docker.com/r/apache/orc-dev/tags

## Test

To test against all of the Linux OSes against Apache's main branch:
Expand Down
4 changes: 2 additions & 2 deletions docker/reinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

start=`date`
for build in `cat os-list.txt`; do
echo "Re-initialize $build"
OS=$(echo "$build" | cut -d '_' -f1)
REST=$(echo "$build" | cut -d '_' -f2- -s)
if [ -z "$REST" ]; then
ARGS=""
else
ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
fi
TAG=$(echo "orc-$build" | sed -e 's/=/-/g')
TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
echo "Re-initialize $TAG"
( cd $OS && docker build --no-cache -t "$TAG" $ARGS . )
done
echo "Start: $start"
Expand Down
16 changes: 1 addition & 15 deletions docker/run-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ function failure {
rm -f logs/pids.txt logs/*.log

start=`date`
for build in `cat os-list.txt`; do
echo "Building $build"
OS=$(echo "$build" | cut -d '_' -f1)
REST=$(echo "$build" | cut -d '_' -f2- -s)
if [ -z "$REST" ]; then
ARGS=""
else
ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
fi
TAG=$(echo "orc-$build" | sed -e 's/=/-/g')
( cd $OS && docker build -t "$TAG" $ARGS . ) > logs/$build-build.log 2>&1 || exit 1
done
testStart=`date`

for build in `cat os-list.txt`; do
./run-one.sh $1 $2 $build > logs/$build-test.log 2>&1 &
Expand All @@ -58,6 +45,5 @@ for job in `cat logs/pids.txt`; do
done

echo ""
echo "Build start: $start"
echo "Test start: $testStart"
echo "Test start: $start"
echo "End:" `date`
2 changes: 1 addition & 1 deletion docker/run-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function failure {
}

VOLUME="--volume m2cache:/root/.m2/repository"
TAG=$(echo "orc-$BUILD" | sed -e 's/=/-/g')
TAG=$(echo "apache/orc-dev:$BUILD" | sed -e 's/=/-/g')
if [ $GITHUB_USER == "local" ]; then
BRANCH=`git status| head -1 | sed -e 's/On branch //'`
echo "Started local run for $BRANCH on $BUILD at $(date)"
Expand Down

0 comments on commit 05a4238

Please sign in to comment.