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/02 13:54:46 UTC

[hbase] 01/01: HBASE-26317 Publish the test logs for pre commit jenkins job to nightlies

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

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

commit 82b4bff942ae5807779df59fa4811b46e3ed29da
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sat Oct 2 21:54:00 2021 +0800

    HBASE-26317 Publish the test logs for pre commit jenkins job to nightlies
---
 dev-support/Jenkinsfile_GitHub | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/dev-support/Jenkinsfile_GitHub b/dev-support/Jenkinsfile_GitHub
index 69b8c7b..56ba855 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_HADOOP3_CHECK = 'yetus-jdk8-hadoop3-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/**/*"
@@ -314,6 +334,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/**/*"