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/07 15:50:44 UTC

[hbase] branch branch-2.3 updated: HBASE-26317 Publish the test logs for pre commit jenkins job to nightlies (#3715)

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

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


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 035b9d5  HBASE-26317 Publish the test logs for pre commit jenkins job to nightlies (#3715)
035b9d5 is described below

commit 035b9d52021953cbf4185bbf8cc5a46ce7d0203c
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Thu Oct 7 21:58:28 2021 +0800

    HBASE-26317 Publish the test logs for pre commit jenkins job to nightlies (#3715)
    
    Signed-off-by: Peter Somogyi <ps...@apache.org>
---
 dev-support/Jenkinsfile_GitHub | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/dev-support/Jenkinsfile_GitHub b/dev-support/Jenkinsfile_GitHub
index 9d891a1..834f5e4 100644
--- a/dev-support/Jenkinsfile_GitHub
+++ b/dev-support/Jenkinsfile_GitHub
@@ -52,6 +52,7 @@ pipeline {
         WORKDIR_REL_GENERAL_CHECK = 'yetus-general-check'
         WORKDIR_REL_JDK8_HADOOP2_CHECK = 'yetus-jdk8-hadoop2-check'
         WORKDIR_REL_JDK11_HADOOP3_CHECK = 'yetus-jdk11-hadoop3-check'
+        ASF_NIGHTLIES = 'https://nightlies.apache.org'
     }
 
     parameters {
@@ -213,6 +214,25 @@ pipeline {
                                   echo "No archiver directory, skipping compressing."
                                 fi
                             '''
+                            sshPublisher(publishers: [
+                              sshPublisherDesc(configName: 'Nightlies',
+                                transfers: [
+                                  sshTransfer(remoteDirectory: "hbase/${JOB_NAME}/${BUILD_NUMBER}",
+                                    sourceFiles: "${env.WORKDIR_REL}/${env.PATCH_REL}/test_logs.zip"
+                                  )
+                                ]
+                              )
+                            ])
+                            // remove the big test logs zip file, store the nightlies url in test_logs.txt
+                            sh '''#!/bin/bash -e
+                            if [ -f "${PATCHDIR}/test_logs.zip" ]; then
+                              echo "Remove ${PATCHDIR}/test_logs.zip for saving space"
+                              rm -rf "${PATCHDIR}/test_logs.zip"
+                              echo "${ASF_NIGHTLIES}/hbase/${JOB_NAME}/${BUILD_NUMBER}/${WORKDIR_REL}/${PATCH_REL}/test_logs.zip" > "${PATCHDIR}/test_logs.txt"
+                            else
+                              echo "No test_logs.zip, skipping"
+                            fi
+                            '''
                             // Has to be relative to WORKSPACE.
                             archiveArtifacts artifacts: "${WORKDIR_REL}/${PATCH_REL}/*", excludes: "${WORKDIR_REL}/${PATCH_REL}/precommit"
                             archiveArtifacts artifacts: "${WORKDIR_REL}/${PATCH_REL}/**/*", excludes: "${WORKDIR_REL}/${PATCH_REL}/precommit/**/*"
@@ -315,6 +335,25 @@ pipeline {
                                   echo "No archiver directory, skipping compressing."
                                 fi
                             '''
+                            sshPublisher(publishers: [
+                              sshPublisherDesc(configName: 'Nightlies',
+                                transfers: [
+                                  sshTransfer(remoteDirectory: "hbase/${JOB_NAME}/${BUILD_NUMBER}",
+                                    sourceFiles: "${env.WORKDIR_REL}/${env.PATCH_REL}/test_logs.zip"
+                                  )
+                                ]
+                              )
+                            ])
+                            // remove the big test logs zip file, store the nightlies url in test_logs.txt
+                            sh '''#!/bin/bash -e
+                            if [ -f "${PATCHDIR}/test_logs.zip" ]; then
+                              echo "Remove ${PATCHDIR}/test_logs.zip for saving space"
+                              rm -rf "${PATCHDIR}/test_logs.zip"
+                              echo "${ASF_NIGHTLIES}/hbase/${JOB_NAME}/${BUILD_NUMBER}/${WORKDIR_REL}/${PATCH_REL}/test_logs.zip" > "${PATCHDIR}/test_logs.txt"
+                            else
+                              echo "No test_logs.zip, skipping"
+                            fi
+                            '''
                             // Has to be relative to WORKSPACE.
                             archiveArtifacts artifacts: "${WORKDIR_REL}/${PATCH_REL}/*", excludes: "${WORKDIR_REL}/${PATCH_REL}/precommit"
                             archiveArtifacts artifacts: "${WORKDIR_REL}/${PATCH_REL}/**/*", excludes: "${WORKDIR_REL}/${PATCH_REL}/precommit/**/*"