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

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

commit 533947ff0ca1f332cefa792aae9b1298fc6aa8c0
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Sat Dec 5 21:09:09 2020 +0100

    HOP-2212
---
 Jenkinsfile.daily                      | 43 +++++++++++++++++++++++-----------
 integration-tests/scripts/run-tests.sh | 10 +++++---
 2 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/Jenkinsfile.daily b/Jenkinsfile.daily
index 6f47d31..cce1854 100644
--- a/Jenkinsfile.daily
+++ b/Jenkinsfile.daily
@@ -36,6 +36,8 @@ pipeline {
 
     environment {
         MAVEN_SKIP_RC = true
+        dockerImage = ''
+        imagename = 'hop'
     }
 
     options {
@@ -68,19 +70,36 @@ pipeline {
                 checkout scm
             }
         }
-        stage('Build') {
+        stage('Build & Test') {
             when {
                 branch 'integration-tests'
             }
             steps {
-                echo 'Build'
-
-                dir("local-snapshots-dir/") {
-                    deleteDir()
-                }
-
+                echo 'Build & Test'
                 sh "mvn $MAVEN_PARAMS clean install"
             }
+        }
+        // stage('Code Quality') {
+        //     steps {
+        //         echo 'Checking Code Quality on SonarCloud'
+        //         withCredentials([string(credentialsId: 
'sonarcloud-key-apache-hop', variable: 'SONAR_TOKEN')]) {
+        //             sh 'mvn sonar:sonar 
-Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache 
-Dsonar.projectKey=apache_incubator-hop -Dsonar.branch.name=${BRANCH_NAME} 
-Dsonar.login=${SONAR_TOKEN}'
+        //         }
+        //     }
+        // }
+        stage('Create Docker image'){
+            steps {
+                script {
+                    dockerImage = docker.build -f 'Dockerfile.unit-tests' 
imagename
+                }
+            }
+        }
+        stage('Run Integration Tests'){
+            steps {
+                script {
+                    echo 'Run tests'
+                }
+            }            
             post {
                 always {
                     junit(testResults: '**/surefire-reports/*.xml', 
allowEmptyResults: true)
@@ -88,13 +107,9 @@ pipeline {
                 }
             }
         }
-        stage('Code Quality') {
-            steps {
-                echo 'Checking Code Quality on SonarCloud'
-                withCredentials([string(credentialsId: 
'sonarcloud-key-apache-hop', variable: 'SONAR_TOKEN')]) {
-                    sh 'mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io 
-Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-hop 
-Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}'
-                }
-            }
+        stage('Remove docker image'){
+            sh "docker rmi $iamgename:$BUILD_NUMBER"
+            sh "docker rmi $iamgename:latest"
         }
         
 
diff --git a/integration-tests/scripts/run-tests.sh 
b/integration-tests/scripts/run-tests.sh
index 28df867..c584214 100755
--- a/integration-tests/scripts/run-tests.sh
+++ b/integration-tests/scripts/run-tests.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
 if [ -z "${HOP_LOCATION}" ]; then
     HOP_LOCATION=/opt/hop
 fi
@@ -12,10 +14,8 @@ skipped_counter=0
 failures_counter=0
 spacer="==========================================="
 
-#cleanup surefire report
-/dev/null > /tmp/testcases
 
-for d in ../*/ ; do
+for d in $current_dir/../*/ ; do
     if [[ "$d" != *"scripts/" ]]; then
 
         test_name=$(basename $d)
@@ -98,3 +98,7 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> 
/tmp/surefire_report.xml
 echo "<testsuite xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; 
xsi:noNamespaceSchemaLocation=\"https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd\";
 version=\"3.0\" name=\"Hop Integration Tests\" time=\"$total_duration\" 
tests=\"$test_counter\" errors=\"$errors_counter\" skipped=\"$skipped_counter\" 
failures=\"$failures_counter\">" >> /tmp/surefire_report.xml
 cat /tmp/testcases >> /tmp/surefire_report.xml
 echo "</testsuite>" >> /tmp/surefire_report.xml
+
+#Copy final report back
+mkdir -p $current_dir/../surefire-reports/
+cp /tmp/surefire_report.xml $current_dir/../surefire-reports/report.xml

Reply via email to