This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch integration-tests-v2
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git


The following commit(s) were added to refs/heads/integration-tests-v2 by this 
push:
     new a733c22  HOP-2914: fix containers on jenkins
a733c22 is described below

commit a733c22ef113209958ee38a29f0f3ae69205658b
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Wed Jun 2 14:10:00 2021 +0200

    HOP-2914: fix containers on jenkins
---
 Jenkinsfile.daily                                  |   5 ++-
 integration-tests/scripts/run-tests-docker.sh      |  38 ++++++++++++++++++++-
 .../spreadsheet/files/exelwriter-testfile.xlsx     | Bin 3598 -> 3619 bytes
 3 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile.daily b/Jenkinsfile.daily
index 738f61d..1de94da 100644
--- a/Jenkinsfile.daily
+++ b/Jenkinsfile.daily
@@ -81,7 +81,7 @@ pipeline {
         stage('Build & Test') {
             steps {
                 echo 'Build & Test'
-                sh "mvn $MAVEN_PARAMS clean install"
+                sh "mvn $MAVEN_PARAMS clean install -DskipTests=true"
             }
         }
         // stage('Code Quality') {
@@ -97,8 +97,7 @@ pipeline {
         // }
         stage('Create Docker image & Run Tests'){
             steps {
-                    sh "docker-compose -f 
'docker/integration-tests/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}"
-                    sh "integration-tests/scripts/run-tests-docker.sh"
+                    sh "integration-tests/scripts/run-tests-docker.sh 
JENKINS_USER=${jenkins_user} JENKINS_UID=${jenkins_uid} 
JENKINS_GROUP=${jenkins_group} JENKINS_GID=${jenkins_gid}"
                 }
             post {
                 always {
diff --git a/integration-tests/scripts/run-tests-docker.sh 
b/integration-tests/scripts/run-tests-docker.sh
index 6a69395..ee9871a 100755
--- a/integration-tests/scripts/run-tests-docker.sh
+++ b/integration-tests/scripts/run-tests-docker.sh
@@ -20,12 +20,46 @@
 
 CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 DOCKER_FILES_DIR="$(cd ${CURRENT_DIR}/../../docker/integration-tests/ && pwd)"
-PROJECT_NAME="$1"
+
+for ARGUMENT in "$@"
+do
+
+    KEY=$(echo $ARGUMENT | cut -f1 -d=)
+    VALUE=$(echo $ARGUMENT | cut -f2 -d=)   
+
+    case "$KEY" in
+            PROJECT_NAME)    PROJECT_NAME=${VALUE} ;;
+            JENKINS_USER)    REPOSITORY_NAME=${VALUE} ;;
+            JENKINS_UID)    REPOSITORY_NAME=${VALUE} ;;
+            JENKINS_GROUP)    REPOSITORY_NAME=${VALUE} ;;
+            JENKINS_GID)    REPOSITORY_NAME=${VALUE} ;;
+            *)   
+    esac    
+
+
+done
+
 
 if [ -z "${PROJECT_NAME}" ]; then
     PROJECT_NAME="*"
 fi
 
+if [ -z "${JENKINS_USER}" ]; then
+    JENKINS_USER="jenkins"
+fi
+
+if [ -z "${JENKINS_UID}" ]; then
+    JENKINS_UID="1000"
+fi
+
+if [ -z "${JENKINS_GROUP}" ]; then
+    JENKINS_GROUP="jenkins"
+fi
+
+if [ -z "${JENKINS_GID}" ]; then
+    JENKINS_GID="1000"
+fi
+
 #Cleanup surefire reports
 rm -rf "${CURRENT_DIR}"/../surefire-reports
 mkdir -p "${CURRENT_DIR}"/../surefire-reports/
@@ -45,10 +79,12 @@ for d in "${CURRENT_DIR}"/../${PROJECT_NAME}/ ; do
 
         if [ -f "${DOCKER_FILES_DIR}/integration-tests-${PROJECT_NAME}.yaml" 
]; then
             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
         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}
             PROJECT_NAME=${PROJECT_NAME} docker-compose -f 
${DOCKER_FILES_DIR}/integration-tests-base.yaml up --abort-on-container-exit
             docker-compose -f ${DOCKER_FILES_DIR}/integration-tests-base.yaml 
down
         fi
diff --git a/integration-tests/spreadsheet/files/exelwriter-testfile.xlsx 
b/integration-tests/spreadsheet/files/exelwriter-testfile.xlsx
index f50090a..5a70089 100644
Binary files a/integration-tests/spreadsheet/files/exelwriter-testfile.xlsx and 
b/integration-tests/spreadsheet/files/exelwriter-testfile.xlsx differ

Reply via email to