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

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f4c587  Fixing grep thirdeye changes in github action scripts (#5532)
4f4c587 is described below

commit 4f4c587304ec32933b9d594a017b53d5440556bd
Author: Xiang Fu <fx19880...@gmail.com>
AuthorDate: Wed Jun 10 10:06:53 2020 -0700

    Fixing grep thirdeye changes in github action scripts (#5532)
    
    * Fixing grep thirdeye changes in github action scripts
    
    * Update .github/workflows/scripts/.pinot_quickstart.sh
    
    Co-authored-by: Xiaotian (Jackie) Jiang 
<17555551+jackie-ji...@users.noreply.github.com>
    
    * Update .github/workflows/scripts/.pinot_test.sh
    
    Co-authored-by: Xiaotian (Jackie) Jiang 
<17555551+jackie-ji...@users.noreply.github.com>
    
    * Update .pinot_test.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .github/workflows/scripts/.pinot_test.sh
    
    Co-authored-by: Xiaotian (Jackie) Jiang 
<17555551+jackie-ji...@users.noreply.github.com>
    
    * Update .pinot_test.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_test.sh
    
    * Update .pinot_quickstart.sh
    
    * Update .pinot_test.sh
    
    Co-authored-by: Xiaotian (Jackie) Jiang 
<17555551+jackie-ji...@users.noreply.github.com>
---
 .github/workflows/scripts/.pinot_quickstart.sh | 23 ++++++++++-------------
 .github/workflows/scripts/.pinot_test.sh       | 19 +++++--------------
 2 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/.github/workflows/scripts/.pinot_quickstart.sh 
b/.github/workflows/scripts/.pinot_quickstart.sh
index faa5d04..b57c621 100755
--- a/.github/workflows/scripts/.pinot_quickstart.sh
+++ b/.github/workflows/scripts/.pinot_quickstart.sh
@@ -18,35 +18,32 @@
 # under the License.
 #
 
+# Print environment variables
+printenv
+
 # Java version
 java -version
 
 # Check ThirdEye related changes
-COMMIT_BEFORE=$(jq -r ".pull_request.base.sha" "${GITHUB_EVENT_PATH}")
-COMMIT_AFTER=$(jq -r ".pull_request.head.sha" "${GITHUB_EVENT_PATH}")
-git fetch
-git diff --name-only "${COMMIT_BEFORE}...${COMMIT_AFTER}" | grep -E
+DIFF_URL=$(jq -r ".pull_request.diff_url" "${GITHUB_EVENT_PATH}")
+curl -L ${DIFF_URL} |grep -E '^diff --git'
+curl -L ${DIFF_URL} |grep -E '^diff --git' |grep -E '( a/thirdeye)|( 
b/thirdeye)'
 if [ $? -eq 0 ]; then
   echo 'Skip ThirdEye tests for Quickstart'
   exit 0
 fi
 
 # Build
-PASS=1
+PASS=0
 for i in $(seq 1 5)
 do
-  if [ "${PASS}" -eq 0 ]; then
-    break;
-  fi
-  mvn clean install -B -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true 
${DEPLOY_BUILD_OPTS} ${KAFKA_BUILD_OPTS} > /tmp/mvn_build_log
+  mvn clean install -B -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true
   if [ $? -eq 0 ]; then
-    PASS=0
-  else
-    tail -1000 /tmp/mvn_build_log
     PASS=1
+    break;
   fi
 done
-if [ "${PASS}" != 0 ]; then
+if [ "${PASS}" != 1 ]; then
     exit 1;
 fi
 
diff --git a/.github/workflows/scripts/.pinot_test.sh 
b/.github/workflows/scripts/.pinot_test.sh
index f7c21f4..e19b571 100755
--- a/.github/workflows/scripts/.pinot_test.sh
+++ b/.github/workflows/scripts/.pinot_test.sh
@@ -22,10 +22,9 @@
 java -version
 
 # Check ThirdEye related changes
-COMMIT_BEFORE=$(jq -r ".pull_request.base.sha" "${GITHUB_EVENT_PATH}")
-COMMIT_AFTER=$(jq -r ".pull_request.head.sha" "${GITHUB_EVENT_PATH}")
-git fetch
-git diff --name-only "${COMMIT_BEFORE}...${COMMIT_AFTER}" | grep -E
+DIFF_URL=$(jq -r ".pull_request.diff_url" "${GITHUB_EVENT_PATH}")
+curl -L ${DIFF_URL} |grep -E '^diff --git'
+curl -L ${DIFF_URL} |grep -E '^diff --git' |grep -E '( a/thirdeye)|( 
b/thirdeye)'
 if [ $? -eq 0 ]; then
   echo 'ThirdEye changes.'
 
@@ -44,17 +43,9 @@ if [ $? -eq 0 ]; then
   fi
 fi
 
-passed=0
-
 # Only run integration tests if needed
 if [ "$RUN_INTEGRATION_TESTS" != false ]; then
-  mvn test -B -P travis,travis-integration-tests-only
-  if [ $? -eq 0 ]; then
-    passed=1
-  fi
+  mvn test -B -P travis,travis-integration-tests-only && exit 0 || exit 1
 else
-  mvn test -B -P travis,travis-no-integration-tests
-  if [ $? -eq 0 ]; then
-    passed=1
-  fi
+  mvn test -B -P travis,travis-no-integration-tests && exit 0 || exit 1
 fi


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to