HBASE-26390 Upload src tarball to nightlies for nightly jobs (#3793)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
This commit is contained in:
Duo Zhang 2021-10-25 23:32:15 +08:00
parent 444dec9289
commit 362117b52c
1 changed files with 32 additions and 14 deletions

View File

@ -381,7 +381,7 @@ pipeline {
] ]
) )
]) ])
// remove the big test logs zip file, store the nightlies url in test_logs.txt // remove the big test logs zip file, store the nightlies url in test_logs.html
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then
echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space" echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space"
@ -488,7 +488,7 @@ pipeline {
] ]
) )
]) ])
// remove the big test logs zip file, store the nightlies url in test_logs.txt // remove the big test logs zip file, store the nightlies url in test_logs.html
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then
echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space" echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space"
@ -602,7 +602,7 @@ pipeline {
] ]
) )
]) ])
// remove the big test logs zip file, store the nightlies url in test_logs.txt // remove the big test logs zip file, store the nightlies url in test_logs.html
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then
echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space" echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space"
@ -718,7 +718,7 @@ pipeline {
] ]
) )
]) ])
// remove the big test logs zip file, store the nightlies url in test_logs.txt // remove the big test logs zip file, store the nightlies url in test_logs.html
sh '''#!/bin/bash -e sh '''#!/bin/bash -e
if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then
echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space" echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space"
@ -869,12 +869,30 @@ pipeline {
echo "(/) {color:green}+1 client integration test{color}" >output-integration/commentfile echo "(/) {color:green}+1 client integration test{color}" >output-integration/commentfile
fi fi
''' '''
} }
post { post {
always { always {
stash name: 'srctarball-result', includes: "output-srctarball/commentfile,output-integration/commentfile" stash name: 'srctarball-result', includes: "output-srctarball/commentfile,output-integration/commentfile"
sshPublisher(publishers: [
sshPublisherDesc(configName: 'Nightlies',
transfers: [
sshTransfer(remoteDirectory: "hbase/${JOB_NAME}/${BUILD_NUMBER}",
sourceFiles: "output-srctarball/hbase-src.tar.gz"
)
]
)
])
// remove the big src tarball, store the nightlies url in hbase-src.html
sh '''#!/bin/bash -e
SRC_TAR="${WORKSPACE}/output-srctarball/hbase-src.tar.gz"
if [ -f "${SRC_TAR}" ]; then
echo "Remove ${SRC_TAR} for saving space"
rm -rf "${SRC_TAR}"
python ${BASEDIR}/dev-support/gen_redirect_html.py "${ASF_NIGHTLIES_BASE}/output-srctarball" > "${WORKSPACE}/output-srctarball/hbase-src.html"
else
echo "No hbase-src.tar.gz, skipping"
fi
'''
archiveArtifacts artifacts: 'output-srctarball/*' archiveArtifacts artifacts: 'output-srctarball/*'
archiveArtifacts artifacts: 'output-srctarball/**/*' archiveArtifacts artifacts: 'output-srctarball/**/*'
archiveArtifacts artifacts: 'output-integration/*' archiveArtifacts artifacts: 'output-integration/*'