This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 06a0a54 HOP-2944: add parquet-tools to image
new 6452889 Merge pull request #860 from hansva/master
06a0a54 is described below
commit 06a0a547dbb089be7b23c25b442a0c4bfd29d852
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Jun 10 12:44:29 2021 +0200
HOP-2944: add parquet-tools to image
---
docker/integration-tests/Dockerfile.unit-tests | 57 ++++++++++++++------------
integration-tests/scripts/run-tests-docker.sh | 6 ++-
2 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/docker/integration-tests/Dockerfile.unit-tests
b/docker/integration-tests/Dockerfile.unit-tests
index 6f4c29d..6e26f2a 100644
--- a/docker/integration-tests/Dockerfile.unit-tests
+++ b/docker/integration-tests/Dockerfile.unit-tests
@@ -15,7 +15,7 @@
# limitations under the License.
#
-FROM openjdk:8-alpine
+FROM ubuntu
MAINTAINER Apache Hop
# Argument Branch name, used to download correct version
@@ -30,6 +30,8 @@ ARG JENKINS_USER=hop
ARG JENKINS_GROUP=hop
ARG JENKINS_UID=1000
ARG JENKINS_GID=1000
+# Set system properties
+ENV DEBIAN_FRONTEND=noninteractive
# any JRE settings you want to pass on
# The “-XX:+AggressiveHeap” tells the container to use all memory assigned to
the container.
@@ -39,35 +41,40 @@ ENV HOP_OPTIONS=-XX:+AggressiveHeap
# INSTALL REQUIRED PACKAGES AND ADJUST LOCALE
# procps: The package includes the programs ps, top, vmstat, w, kill, free,
slabtop, and skill
-RUN apk update \
- && apk add --no-cache bash curl procps \
- gcompat \
- msttcorefonts-installer \
- fontconfig \
- font-noto \
- font-noto-adlam \
- font-noto-adlamunjoined \
- font-noto-arabic \
- font-noto-armenian \
- font-noto-avestan \
- font-noto-bamum \
- font-noto-bengali \
- font-noto-buhid \
- font-noto-carian \
- font-noto-chakma \
- font-noto-cherokee \
- && update-ms-fonts \
- && fc-cache -f \
- && rm -rf /var/cache/apk/* \
+RUN apt-get update \
+ && apt-get install --assume-yes \
+ bash \
+ curl \
+ procps \
+ git \
+ python3-pip \
+ openjdk-8-jre-headless \
+ unzip \
+ ttf-mscorefonts-installer \
+ locales \
&& mkdir ${VOLUME_MOUNT_POINT} \
- && addgroup -g ${JENKINS_GID} ${JENKINS_GROUP} \
- && adduser -D -s /bin/bash -h /home/${JENKINS_USER} --uid ${JENKINS_UID}
--ingroup ${JENKINS_GROUP} ${JENKINS_USER} \
+ && addgroup -gid ${JENKINS_GID} ${JENKINS_GROUP} \
+ && useradd -m -d /home/${JENKINS_USER} -u ${JENKINS_UID} -g
${JENKINS_GROUP} ${JENKINS_USER} \
&& chown ${JENKINS_USER}:${JENKINS_GROUP} ${DEPLOYMENT_PATH} \
&& chown ${JENKINS_USER}:${JENKINS_GROUP} ${VOLUME_MOUNT_POINT}
-# copy the hop package from the local resources folder to the container image
directory
+# Set Locale correctly
+RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
+ locale-gen
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
+# Install parquet-tools from Python
+
+RUN pip3 install parquet-tools
+
+# Copy the hop package from the local resources folder to the container image
directory
+
COPY --chown=${JENKINS_USER}:${JENKINS_GROUP} ./assemblies/client/target/hop-*
${DEPLOYMENT_PATH}/hop.zip
+# Unzip and install in correct location
+
RUN unzip ${DEPLOYMENT_PATH}/hop.zip -d ${DEPLOYMENT_PATH} \
&& rm ${DEPLOYMENT_PATH}/hop.zip \
&& chown -R ${JENKINS_USER}:${JENKINS_GROUP} ${DEPLOYMENT_PATH}/hop \
@@ -77,8 +84,6 @@ RUN unzip ${DEPLOYMENT_PATH}/hop.zip -d ${DEPLOYMENT_PATH} \
VOLUME ["/files"]
USER ${JENKINS_USER}
ENV PATH=$PATH:${DEPLOYMENT_PATH}/hop
-#SET HOP_JAVA_HOME
-ENV HOP_JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
WORKDIR /home/${JENKINS_USER}
# CMD ["/bin/bash"]
ENTRYPOINT []
\ No newline at end of file
diff --git a/integration-tests/scripts/run-tests-docker.sh
b/integration-tests/scripts/run-tests-docker.sh
index 0353790..d6237a4 100755
--- a/integration-tests/scripts/run-tests-docker.sh
+++ b/integration-tests/scripts/run-tests-docker.sh
@@ -81,7 +81,7 @@ for d in "${CURRENT_DIR}"/../${PROJECT_NAME}/ ; do
echo "Project compose exists."
PROJECT_NAME=${PROJECT_NAME} docker-compose -f
${DOCKER_FILES_DIR}/integration-tests-${PROJECT_NAME}.yaml build --build-arg
JENKINS_USER=${JENKINS_USER} --build-arg JENKINS_UID=${JENKINS_UID} --build-arg
JENKINS_GROUP=${JENKINS_GROUP} --build-arg JENKINS_GID=${JENKINS_GID}
PROJECT_NAME=${PROJECT_NAME} docker-compose -f
${DOCKER_FILES_DIR}/integration-tests-${PROJECT_NAME}.yaml up
--abort-on-container-exit
- docker-compose -f
${DOCKER_FILES_DIR}/integration-tests-${PROJECT_NAME}.yaml down --rmi all
+ docker-compose -f
${DOCKER_FILES_DIR}/integration-tests-${PROJECT_NAME}.yaml down
else
echo "Project compose does not exists."
PROJECT_NAME=${PROJECT_NAME} docker-compose -f
${DOCKER_FILES_DIR}/integration-tests-base.yaml build --build-arg
JENKINS_USER=${JENKINS_USER} --build-arg JENKINS_UID=${JENKINS_UID} --build-arg
JENKINS_GROUP=${JENKINS_GROUP} --build-arg JENKINS_GID=${JENKINS_GID}
@@ -92,4 +92,6 @@ for d in "${CURRENT_DIR}"/../${PROJECT_NAME}/ ; do
done
#Cleanup all images
-docker-compose -f ${DOCKER_FILES_DIR}/integration-tests-base.yaml down --rmi
all --remove-orphans
\ No newline at end of file
+for d in ${DOCKER_FILES_DIR}/integration-tests-*.yaml ; do
+ docker-compose -f $d down --rmi all --remove-orphans
+done