You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/12/27 17:07:21 UTC

[incubator-hop] branch master updated: HOP-2318 (#501)

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 136a863  HOP-2318 (#501)
136a863 is described below

commit 136a863e08008735bca27f6a453a13e19ae77831
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Sun Dec 27 18:07:12 2020 +0100

    HOP-2318 (#501)
    
    * HOP-2318: switch to sh steps for Jenkins
    
    * HOP-2318: remove invalid bracket
    
    * HOP-2318: add quotes around commands
    
    * HOP-2318: add Jenkins user/group for permissions
    
    * HOP-2318: fix docker-compose build
    
    * HOP-2318: enable sonar again
---
 Jenkinsfile.daily                               | 18 +++++-------------
 docker/integration-tests/docker-compose-ci.yaml |  7 +++++--
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/Jenkinsfile.daily b/Jenkinsfile.daily
index 2fd573a..f6d9292 100644
--- a/Jenkinsfile.daily
+++ b/Jenkinsfile.daily
@@ -55,10 +55,6 @@ pipeline {
         disableConcurrentBuilds()
     }
 
-    parameters {
-        booleanParam(name: 'CLEAN', defaultValue: true, description: 'Perform the build in clean workspace')
-    }
-
     stages {
         stage('Initialization') {
               steps {
@@ -101,19 +97,15 @@ pipeline {
         }
         stage('Create Docker image & Run Tests'){
             steps {
-                script {
-                        docker-compose -f docker/integration-tests/docker-compose-ci.yaml up -d
-                        docker wait integration-tests_integration_test_1
-                        docker logs integration-tests_integration_test_1
-                    }
+                    sh "docker-compose -f 'docker/integration-tests/docker-compose-ci.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 "docker-compose -f 'docker/integration-tests/docker-compose-ci.yaml' up -d"
+                    sh "docker wait integration-tests_integration_test_1"
+                    sh "docker logs integration-tests_integration_test_1"
                 }
-            }
             post {
                 always {
                     junit(testResults: 'integration-tests/**/surefire-reports/*.xml', allowEmptyResults: true)
-                    script{
-                        docker-compose -f docker/integration-tests/docker-compose-ci.yaml down --rmi all
-                    }
+                    sh "docker-compose -f 'docker/integration-tests/docker-compose-ci.yaml' down --rmi all"
                 }
             }
         }
diff --git a/docker/integration-tests/docker-compose-ci.yaml b/docker/integration-tests/docker-compose-ci.yaml
index 426d5a8..d852dad 100644
--- a/docker/integration-tests/docker-compose-ci.yaml
+++ b/docker/integration-tests/docker-compose-ci.yaml
@@ -21,6 +21,11 @@ services:
       build:
           context: ../../.
           dockerfile: docker/integration-tests/Dockerfile.unit-tests
+          args:                                                                     
+            - JENKINS_USER=jenkins
+            - JENKINS_UID=1000
+            - JENKINS_GROUP=jenkins
+            - JENKINS_GID=1000
       volumes:
         - ../../integration-tests/:/files
       depends_on:
@@ -29,9 +34,7 @@ services:
         - postgres
       environment:
         - FLASK_ENV=docker
-      #command: ["bash", "-c", "ls -al /files/scripts/"]
       command: ["bash", "-c", "/files/scripts/run-tests.sh"]
-      #command: ["bash", "-c", "PGPASSWORD=hop_password psql --host=postgres --username=hop_user --dbname=hop_database"]
     postgres:
         image: postgres:latest
         env_file: