You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/10/08 07:03:33 UTC

[hbase] branch HBASE-26339 updated (d48c81e -> 5feb652)

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

zhangduo pushed a change to branch HBASE-26339
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    omit d48c81e  syntax
    omit a01573e  HBASE-26339 SshPublisher will skip uploading artifacts if the build is failure
     new 5feb652  HBASE-26339 SshPublisher will skip uploading artifacts if the build is failure

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d48c81e)
            \
             N -- N -- N   refs/heads/HBASE-26339 (5feb652)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-support/Jenkinsfile        | 182 ++++++++++++++++++++++++++---------------
 dev-support/Jenkinsfile_GitHub |  90 ++++++++++----------
 2 files changed, 161 insertions(+), 111 deletions(-)

[hbase] 01/01: HBASE-26339 SshPublisher will skip uploading artifacts if the build is failure

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch HBASE-26339
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 5feb652fe6ee627819613a109e30e4bd8f9c103c
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Fri Oct 8 12:04:12 2021 +0800

    HBASE-26339 SshPublisher will skip uploading artifacts if the build is failure
---
 dev-support/Jenkinsfile        | 182 ++++++++++++++++++++++++++---------------
 dev-support/Jenkinsfile_GitHub |  69 ++++++++++++----
 2 files changed, 167 insertions(+), 84 deletions(-)

diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 8194787..85d2c2a 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -210,7 +210,7 @@ pipeline {
               rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
               echo '(x) {color:red}-1 general checks{color}' >"${OUTPUT_DIR}/commentfile"
               echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
-'''
+            '''
             unstash 'yetus'
             // since we have a new node definition we need to re-do the scm checkout
             dir('component') {
@@ -222,20 +222,30 @@ pipeline {
               "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
               echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
               ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
-'''
-            // TODO roll this into the hbase_nightly_yetus script
-            sh '''#!/usr/bin/env bash
-              set -e
-              declare -i status=0
-              if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
-                echo '(/) {color:green}+1 general checks{color}' > "${OUTPUT_DIR}/commentfile"
-              else
-                echo '(x) {color:red}-1 general checks{color}' > "${OUTPUT_DIR}/commentfile"
-                status=1
-              fi
-              echo "-- For more information [see general report|${BUILD_URL}General_20Nightly_20Build_20Report/]" >> "${OUTPUT_DIR}/commentfile"
-              exit "${status}"
             '''
+            // TODO roll this into the hbase_nightly_yetus script
+            script {
+              def ret = sh(
+                returnStatus: true,
+                script: '''#!/usr/bin/env bash
+                  set -e
+                  declare -i status=0
+                  if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+                    echo '(/) {color:green}+1 general checks{color}' > "${OUTPUT_DIR}/commentfile"
+                  else
+                    echo '(x) {color:red}-1 general checks{color}' > "${OUTPUT_DIR}/commentfile"
+                    status=1
+                  fi
+                  echo "-- For more information [see general report|${BUILD_URL}General_20Nightly_20Build_20Report/]" >> "${OUTPUT_DIR}/commentfile"
+                  exit "${status}"
+                '''
+              )
+              if (ret != 0) {
+                // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                // test output. See HBASE-26339 for more details.
+                currentBuild.result = 'UNSTABLE'
+              }
+            }
           }
           post {
             always {
@@ -278,7 +288,7 @@ pipeline {
               rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
               echo '(x) {color:red}-1 jdk7 checks{color}' >"${OUTPUT_DIR}/commentfile"
               echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
-'''
+            '''
             unstash 'yetus'
             dir('component') {
               checkout scm
@@ -289,19 +299,29 @@ pipeline {
               "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
               echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
               ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
-'''
-            sh '''#!/usr/bin/env bash
-              set -e
-              declare -i status=0
-              if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
-                echo '(/) {color:green}+1 jdk7 checks{color}' > "${OUTPUT_DIR}/commentfile"
-              else
-                echo '(x) {color:red}-1 jdk7 checks{color}' > "${OUTPUT_DIR}/commentfile"
-                status=1
-              fi
-              echo "-- For more information [see jdk7 report|${BUILD_URL}/JDK7_20Nightly_20Build_20Report/]" >> "${OUTPUT_DIR}/commentfile"
-              exit "${status}"
             '''
+            script {
+              def ret = sh(
+                returnStatus: true,
+                script: '''#!/usr/bin/env bash
+                  set -e
+                  declare -i status=0
+                  if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+                    echo '(/) {color:green}+1 jdk7 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                  else
+                    echo '(x) {color:red}-1 jdk7 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                    status=1
+                  fi
+                  echo "-- For more information [see jdk7 report|${BUILD_URL}/JDK7_20Nightly_20Build_20Report/]" >> "${OUTPUT_DIR}/commentfile"
+                  exit "${status}"
+                '''
+              )
+              if (ret != 0) {
+                // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                // test output. See HBASE-26339 for more details.
+                currentBuild.result = 'UNSTABLE'
+              }
+            }
           }
           post {
             always {
@@ -378,7 +398,7 @@ pipeline {
               rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
               echo '(x) {color:red}-1 jdk8 hadoop2 checks{color}' >"${OUTPUT_DIR}/commentfile"
               echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
-'''
+            '''
             unstash 'yetus'
             dir('component') {
               checkout scm
@@ -389,19 +409,29 @@ pipeline {
               "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
               echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
               ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
-'''
-            sh '''#!/usr/bin/env bash
-              set -e
-              declare -i status=0
-              if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
-                echo '(/) {color:green}+1 jdk8 hadoop2 checks{color}' > "${OUTPUT_DIR}/commentfile"
-              else
-                echo '(x) {color:red}-1 jdk8 hadoop2 checks{color}' > "${OUTPUT_DIR}/commentfile"
-                status=1
-              fi
-              echo "-- For more information [see jdk8 (hadoop2) report|${BUILD_URL}JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]" >> "${OUTPUT_DIR}/commentfile"
-              exit "${status}"
             '''
+            script {
+              def ret = sh(
+                returnStatus: true,
+                script: '''#!/usr/bin/env bash
+                  set -e
+                  declare -i status=0
+                  if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+                    echo '(/) {color:green}+1 jdk8 hadoop2 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                  else
+                    echo '(x) {color:red}-1 jdk8 hadoop2 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                    status=1
+                  fi
+                  echo "-- For more information [see jdk8 (hadoop2) report|${BUILD_URL}JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]" >> "${OUTPUT_DIR}/commentfile"
+                  exit "${status}"
+                '''
+              )
+              if (ret != 0) {
+                // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                // test output. See HBASE-26339 for more details.
+                currentBuild.result = 'UNSTABLE'
+              }
+            }
           }
           post {
             always {
@@ -482,7 +512,7 @@ pipeline {
               rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
               echo '(x) {color:red}-1 jdk8 hadoop3 checks{color}' >"${OUTPUT_DIR}/commentfile"
               echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
-'''
+            '''
             unstash 'yetus'
             dir('component') {
               checkout scm
@@ -493,19 +523,29 @@ pipeline {
               "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
               echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
               ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
-'''
-            sh '''#!/usr/bin/env bash
-              set -e
-              declare -i status=0
-              if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
-                echo '(/) {color:green}+1 jdk8 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
-              else
-                echo '(x) {color:red}-1 jdk8 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
-                status=1
-              fi
-              echo "-- For more information [see jdk8 (hadoop3) report|${BUILD_URL}JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]" >> "${OUTPUT_DIR}/commentfile"
-              exit "${status}"
             '''
+            script {
+              def ret = sh(
+                returnStatus: true,
+                script: '''#!/usr/bin/env bash
+                  set -e
+                  declare -i status=0
+                  if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+                    echo '(/) {color:green}+1 jdk8 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                  else
+                    echo '(x) {color:red}-1 jdk8 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                    status=1
+                  fi
+                  echo "-- For more information [see jdk8 (hadoop3) report|${BUILD_URL}JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]" >> "${OUTPUT_DIR}/commentfile"
+                  exit "${status}"
+                '''
+              )
+              if (ret != 0) {
+                // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                // test output. See HBASE-26339 for more details.
+                currentBuild.result = 'UNSTABLE'
+              }
+            }
           }
           post {
             always {
@@ -588,7 +628,7 @@ pipeline {
               rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
               echo '(x) {color:red}-1 jdk11 hadoop3 checks{color}' >"${OUTPUT_DIR}/commentfile"
               echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
-'''
+            '''
             unstash 'yetus'
             dir('component') {
               checkout scm
@@ -599,19 +639,29 @@ pipeline {
               "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
               echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
               ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
-'''
-            sh '''#!/usr/bin/env bash
-              set -e
-              declare -i status=0
-              if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
-                echo '(/) {color:green}+1 jdk11 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
-              else
-                echo '(x) {color:red}-1 jdk11 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
-                status=1
-              fi
-              echo "-- For more information [see jdk11 report|${BUILD_URL}JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]" >> "${OUTPUT_DIR}/commentfile"
-              exit "${status}"
             '''
+            script {
+              def ret = sh(
+                returnStatus: true,
+                script: '''#!/usr/bin/env bash
+                  set -e
+                  declare -i status=0
+                  if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+                    echo '(/) {color:green}+1 jdk11 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                  else
+                    echo '(x) {color:red}-1 jdk11 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
+                    status=1
+                  fi
+                  echo "-- For more information [see jdk11 report|${BUILD_URL}JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]" >> "${OUTPUT_DIR}/commentfile"
+                  exit "${status}"
+                '''
+              )
+              if (ret != 0) {
+                // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                // test output. See HBASE-26339 for more details.
+                currentBuild.result = 'UNSTABLE'
+              }
+            }
           }
           post {
             always {
diff --git a/dev-support/Jenkinsfile_GitHub b/dev-support/Jenkinsfile_GitHub
index 56ba855..130a6db 100644
--- a/dev-support/Jenkinsfile_GitHub
+++ b/dev-support/Jenkinsfile_GitHub
@@ -102,12 +102,23 @@ pipeline {
                                   passwordVariable: 'GITHUB_PASSWORD',
                                   usernameVariable: 'GITHUB_USER'
                                 )]) {
-                                sh label: 'test-patch', script: '''#!/bin/bash -e
-                                    hostname -a ; pwd ; ls -la
-                                    printenv 2>&1 | sort
-                                    echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
-                                    "${YETUS_DRIVER}"
-                                '''
+                                script {
+                                  def ret = sh(
+                                    label: 'test-patch',
+                                    returnStatus: true,
+                                    script: '''#!/bin/bash -e
+                                      hostname -a ; pwd ; ls -la
+                                      printenv 2>&1 | sort
+                                      echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
+                                      "${YETUS_DRIVER}"
+                                    '''
+                                  )
+                                  if (ret != 0) {
+                                    // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                                    // test output. See HBASE-26339 for more details.
+                                    currentBuild.result = 'UNSTABLE'
+                                  }
+                                }
                             }
                         }
                     }
@@ -189,12 +200,23 @@ pipeline {
                                 passwordVariable: 'GITHUB_PASSWORD',
                                 usernameVariable: 'GITHUB_USER'
                               )]) {
-                                sh label: 'test-patch', script: '''#!/bin/bash -e
-                                    hostname -a ; pwd ; ls -la
-                                    printenv 2>&1 | sort
-                                    echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
-                                    "${YETUS_DRIVER}"
-                                '''
+                                script {
+                                  def ret = sh(
+                                    label: 'test-patch',
+                                    returnStatus: true,
+                                    script: '''#!/bin/bash -e
+                                      hostname -a ; pwd ; ls -la
+                                      printenv 2>&1 | sort
+                                      echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
+                                      "${YETUS_DRIVER}"
+                                    '''
+                                  )
+                                  if (ret != 0) {
+                                    // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                                    // test output. See HBASE-26339 for more details.
+                                    currentBuild.result = 'UNSTABLE'
+                                  }
+                                }
                             }
                         }
                     }
@@ -309,12 +331,23 @@ pipeline {
                                 passwordVariable: 'GITHUB_PASSWORD',
                                 usernameVariable: 'GITHUB_USER'
                               )]) {
-                                sh label: 'test-patch', script: '''#!/bin/bash -e
-                                    hostname -a ; pwd ; ls -la
-                                    printenv 2>&1 | sort
-                                    echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
-                                    "${YETUS_DRIVER}"
-                                '''
+                                script {
+                                  def ret = sh(
+                                    label: 'test-patch',
+                                    returnStatus: true,
+                                    script: '''#!/bin/bash -e
+                                      hostname -a ; pwd ; ls -la
+                                      printenv 2>&1 | sort
+                                      echo "[INFO] Launching Yetus via ${YETUS_DRIVER}"
+                                      "${YETUS_DRIVER}"
+                                    '''
+                                  )
+                                  if (ret != 0) {
+                                    // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
+                                    // test output. See HBASE-26339 for more details.
+                                    currentBuild.result = 'UNSTABLE'
+                                  }
+                                }
                             }
                         }
                     }