Repository: hive
Updated Branches:
  refs/heads/master 19774029c -> 62c45de1c


HIVE-14793. Allow ptest branch to be specified, PROFILE override. (Siddharth 
Seth, reviewed by Sergio Peña)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/62c45de1
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/62c45de1
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/62c45de1

Branch: refs/heads/master
Commit: 62c45de1c12b2f8db6d726462cc93382aedc0905
Parents: 1977402
Author: Siddharth Seth <ss...@apache.org>
Authored: Tue Sep 20 15:37:49 2016 -0700
Committer: Siddharth Seth <ss...@apache.org>
Committed: Tue Sep 20 15:37:49 2016 -0700

----------------------------------------------------------------------
 dev-support/jenkins-execute-build.sh | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/62c45de1/dev-support/jenkins-execute-build.sh
----------------------------------------------------------------------
diff --git a/dev-support/jenkins-execute-build.sh 
b/dev-support/jenkins-execute-build.sh
index b2ba8e9..2142942 100644
--- a/dev-support/jenkins-execute-build.sh
+++ b/dev-support/jenkins-execute-build.sh
@@ -26,7 +26,16 @@ build_ptest_client() {
        test -d $PTEST_BUILD_DIR || mkdir -p $PTEST_BUILD_DIR
        cd $PTEST_BUILD_DIR &&  rm -rf hive
 
-       git clone --depth 1 https://github.com/apache/hive.git
+  unset GIT_CLONE_ARGS
+  if [ -n "${PTEST_GIT_BRANCH}" ]; then
+    GIT_CLONE_ARGS=" -b ${PTEST_GIT_BRANCH}"
+  fi
+  if [ -z "${PTEST_GIT_REPO}" ]; then
+    PTEST_GIT_REPO=https://github.com/apache/hive.git
+  fi
+  GIT_CLONE_ARGS=${GIT_CLONE_ARGS}" ${PTEST_GIT_REPO} hive"
+
+       git clone --depth 1 ${GIT_CLONE_ARGS}
        cd hive/testutils/ptest2
        mvn clean package -DskipTests -Drat.numUnapprovedLicenses=1000 
-Dmaven.repo.local=$MVN_REPO_LOCAL
 }
@@ -99,10 +108,13 @@ if [ -n "$JIRA_ISSUE" ]; then
                fail "attachment $attachment_id is already tested for 
$JIRA_ISSUE"
        fi
 
-       BUILD_PROFILE=`get_branch_profile $JIRA_PATCH_URL $JIRA_INFO_FILE`
-       if [ -z "$BUILD_PROFILE" ]; then
-               BUILD_PROFILE="$DEFAULT_BUILD_PROFILE"
-       fi
+  # Use the BUILD_PROFILE if it is provided. 
+  if [ -z ${BUILD_PROFILE} ]; then
+         BUILD_PROFILE=`get_branch_profile $JIRA_PATCH_URL $JIRA_INFO_FILE`
+         if [ -z "$BUILD_PROFILE" ]; then
+               BUILD_PROFILE="$DEFAULT_BUILD_PROFILE"
+         fi
+  fi
 
        if is_clear_cache_set $JIRA_INFO_FILE; then
                optionalArgs+=(--clearLibraryCache)
@@ -112,8 +124,10 @@ if [ -n "$JIRA_ISSUE" ]; then
 
        echo "ISSUE: $JIRA_ISSUE PROFILE: $BUILD_PROFILE"
 else
-       # If not JIRA is specified, then use a default profile
-       BUILD_PROFILE="$DEFAULT_BUILD_PROFILE"
+       # If not JIRA is specified, and no BUILD_PROFILE provided, then use a 
default profile
+  if [ -z ${BUILD_PROFILE} ]; then
+       BUILD_PROFILE="$DEFAULT_BUILD_PROFILE"
+  fi
 
        echo "ISSUE: unspecified PROFILE: $BUILD_PROFILE"
 fi

Reply via email to