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

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


The following commit(s) were added to refs/heads/master by this push:
     new 73e2e0a58 IMPALA-11657: Ignore git-reset failures in 
build-all-flag-combinations.sh
73e2e0a58 is described below

commit 73e2e0a5831330d85ea6aeaa237a575254ea5e6b
Author: stiga-huang <[email protected]>
AuthorDate: Thu Oct 13 15:24:56 2022 +0800

    IMPALA-11657: Ignore git-reset failures in build-all-flag-combinations.sh
    
    When building from a tarball, the git-reset command in
    build-all-flag-combinations.sh will fail since it's executed not in a
    git repository. The purpose of the command is to revert the changes made
    by "mvn versions:set". It's ok to skip this step when building in a
    Jenkins job, since that's the last build to verify. No following builds
    will be impacted.
    
    This patch ignores the failure of git-reset. So we can set up a Jenkins
    job to run build-all-flag-combinations.sh from a tarball.
    
    Tests:
     - Verified the script from a tarball locally.
    
    Change-Id: I2079de0b1eb11044d5293546fe6641939d978134
    Reviewed-on: http://gerrit.cloudera.org:8080/19135
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 bin/jenkins/build-all-flag-combinations.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/jenkins/build-all-flag-combinations.sh 
b/bin/jenkins/build-all-flag-combinations.sh
index 8dc76f93b..f931af2ac 100755
--- a/bin/jenkins/build-all-flag-combinations.sh
+++ b/bin/jenkins/build-all-flag-combinations.sh
@@ -130,8 +130,9 @@ else
     FAILED="${FAILED}:${DESCRIPTION}"
   fi
 
-  # Reset the files changed by mvn versions:set
-  git reset --hard HEAD
+  if ! git reset --hard HEAD ; then
+    echo "Failed to reset the files changed by mvn versions:set"
+  fi
 
   ccache -s
   bin/jenkins/get_maven_statistics.sh logs/mvn/mvn.log

Reply via email to