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

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cec7d9  PHOENIX-6102 Better isolation for CI jobs an ASF Jenkins
4cec7d9 is described below

commit 4cec7d9cec6908b3c9b34cd5860decdf98156599
Author: Istvan Toth <[email protected]>
AuthorDate: Mon Aug 31 08:58:10 2020 +0200

    PHOENIX-6102 Better isolation for CI jobs an ASF Jenkins
    
    run post-commit tests in Docker
    also don't mask Hadoop exception when tests break on anonymous unix user
---
 Jenkinsfile                                              | 16 +++++++++-------
 dev/docker/Dockerfile.multibranch                        |  4 ++++
 .../org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java   |  2 +-
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 058208a..ea9e3b6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -27,8 +27,13 @@ pipeline {
     stages {
         stage('MatrixBuild') {
             matrix {
+
                 agent {
-                    label 'Hadoop'
+                    dockerfile {
+                        dir 'dev/docker'
+                        filename 'Dockerfile.multibranch'
+                        label 'Hadoop'
+                    }
                 }
 
                 axes {
@@ -38,11 +43,6 @@ pipeline {
                     }
                 }
 
-                tools {
-                    maven "Maven (latest)"
-                    jdk "JDK 1.8 (latest)"
-                }
-
                 environment {
                     MAVEN_OPTS = '-Xmx3G'
                 }
@@ -72,7 +72,7 @@ pipeline {
                         }
                         steps {
                             sh """#!/bin/bash
-                                ulimit -S -u 60000
+                                ulimit -a
                                 mvn clean verify 
-Dhbase.profile=${HBASE_PROFILE} -B
                             """
                         }
@@ -86,6 +86,7 @@ pipeline {
                 }
 
                 post {
+
                     always {
                         emailext(
                             subject: "Apache-Phoenix | ${BRANCH_NAME} | HBase 
${HBASE_PROFILE} | Build ${BUILD_DISPLAY_NAME} ${currentBuild.currentResult}",
@@ -104,6 +105,7 @@ pipeline {
 """
                        )
                     }
+
                     cleanup {
                         deleteDir()
                     }
diff --git a/dev/docker/Dockerfile.multibranch 
b/dev/docker/Dockerfile.multibranch
new file mode 100644
index 0000000..4eec257
--- /dev/null
+++ b/dev/docker/Dockerfile.multibranch
@@ -0,0 +1,4 @@
+FROM apache/yetus:0.12.0
+
+RUN groupadd --non-unique -g 910 jenkins || true
+RUN useradd -g 910 -u 910 -m jenkins || true
\ No newline at end of file
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
index 5412e52..f17db47 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
@@ -500,7 +500,7 @@ public abstract class PhoenixEmbeddedDriver implements 
Driver, SQLCloseable {
             try {
                 this.user = User.getCurrent();
             } catch (IOException e) {
-                throw new RuntimeException("Couldn't get the current user!!");
+                throw new RuntimeException("Couldn't get the current user!!", 
e);
             }
             if (null == this.user) {
                 throw new RuntimeException("Acquired null user which should 
never happen");

Reply via email to