@@ -37,6 +37,7 @@ pipeline {
3737 OUTPUT_DIR_RELATIVE_JDK8_HADOOP2 = ' output-jdk8-hadoop2'
3838 OUTPUT_DIR_RELATIVE_JDK8_HADOOP3 = ' output-jdk8-hadoop3'
3939 OUTPUT_DIR_RELATIVE_JDK11_HADOOP3 = ' output-jdk11-hadoop3'
40+ OUTPUT_DIR_RELATIVE_JDK17_HADOOP3 = ' output-jdk17-hadoop3'
4041
4142 PROJECT = ' hbase'
4243 PROJECT_PERSONALITY = ' https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
@@ -188,6 +189,7 @@ pipeline {
188189 stash name : ' jdk8-hadoop2-result' , allowEmpty : true , includes : " ${ OUTPUT_DIR_RELATIVE_JDK8_HADOOP2} /doesn't-match"
189190 stash name : ' jdk8-hadoop3-result' , allowEmpty : true , includes : " ${ OUTPUT_DIR_RELATIVE_JDK8_HADOOP3} /doesn't-match"
190191 stash name : ' jdk11-hadoop3-result' , allowEmpty : true , includes : " ${ OUTPUT_DIR_RELATIVE_JDK11_HADOOP3} /doesn't-match"
192+ stash name : ' jdk17-hadoop3-result' , allowEmpty : true , includes : " ${ OUTPUT_DIR_RELATIVE_JDK17_HADOOP3} /doesn't-match"
191193 stash name : ' srctarball-result' , allowEmpty : true , includes : " output-srctarball/doesn't-match"
192194 }
193195 }
@@ -628,6 +630,123 @@ pipeline {
628630 }
629631 }
630632 }
633+
634+ stage (' yetus jdk17 hadoop3 checks' ) {
635+ when {
636+ anyOf {
637+ branch ' master' ;branch ' branch-3'
638+ }
639+ }
640+ agent {
641+ node {
642+ label ' hbase'
643+ }
644+ }
645+ environment {
646+ BASEDIR = " ${ env.WORKSPACE} /component"
647+ TESTS = " ${ env.DEEP_CHECKS} "
648+ OUTPUT_DIR_RELATIVE = " ${ env.OUTPUT_DIR_RELATIVE_JDK17_HADOOP3} "
649+ OUTPUT_DIR = " ${ env.WORKSPACE} /${ env.OUTPUT_DIR_RELATIVE_JDK17_HADOOP3} "
650+ SET_JAVA_HOME = " /usr/lib/jvm/java-17"
651+ // Activates hadoop 3.0 profile in maven runs.
652+ HADOOP_PROFILE = ' 3.0'
653+ SKIP_ERRORPRONE = true
654+ }
655+ steps {
656+ // Must do prior to anything else, since if one of them timesout we'll stash the commentfile
657+ sh ''' #!/usr/bin/env bash
658+ set -e
659+ rm -rf "${OUTPUT_DIR}" && mkdir "${OUTPUT_DIR}"
660+ echo '(x) {color:red}-1 jdk17 hadoop3 checks{color}' >"${OUTPUT_DIR}/commentfile"
661+ echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
662+ '''
663+ unstash ' yetus'
664+ dir(' component' ) {
665+ checkout scm
666+ }
667+ sh ''' #!/usr/bin/env bash
668+ set -e
669+ rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
670+ "${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
671+ echo "got the following saved stats in '${OUTPUT_DIR_RELATIVE}/machine'"
672+ ls -lh "${OUTPUT_DIR_RELATIVE}/machine"
673+ '''
674+ script {
675+ def ret = sh(
676+ returnStatus : true ,
677+ script : ''' #!/usr/bin/env bash
678+ set -e
679+ declare -i status=0
680+ if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
681+ echo '(/) {color:green}+1 jdk17 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
682+ else
683+ echo '(x) {color:red}-1 jdk17 hadoop3 checks{color}' > "${OUTPUT_DIR}/commentfile"
684+ status=1
685+ fi
686+ echo "-- For more information [see jdk17 report|${BUILD_URL}JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]" >> "${OUTPUT_DIR}/commentfile"
687+ exit "${status}"
688+ '''
689+ )
690+ if (ret != 0 ) {
691+ // mark the build as UNSTABLE instead of FAILURE, to avoid skipping the later publish of
692+ // test output. See HBASE-26339 for more details.
693+ currentBuild. result = ' UNSTABLE'
694+ }
695+ }
696+ }
697+ post {
698+ always {
699+ stash name : ' jdk17-hadoop3-result' , includes : " ${ OUTPUT_DIR_RELATIVE} /commentfile"
700+ junit testResults : " ${ env.OUTPUT_DIR_RELATIVE} /**/target/**/TEST-*.xml" , allowEmptyResults : true
701+ // zip surefire reports.
702+ sh ''' #!/bin/bash -e
703+ if [ -d "${OUTPUT_DIR}/archiver" ]; then
704+ count=$(find "${OUTPUT_DIR}/archiver" -type f | wc -l)
705+ if [[ 0 -ne ${count} ]]; then
706+ echo "zipping ${count} archived files"
707+ zip -q -m -r "${OUTPUT_DIR}/test_logs.zip" "${OUTPUT_DIR}/archiver"
708+ else
709+ echo "No archived files, skipping compressing."
710+ fi
711+ else
712+ echo "No archiver directory, skipping compressing."
713+ fi
714+ '''
715+ sshPublisher(publishers : [
716+ sshPublisherDesc(configName : ' Nightlies' ,
717+ transfers : [
718+ sshTransfer(remoteDirectory : " hbase/${ JOB_NAME} /${ BUILD_NUMBER} " ,
719+ sourceFiles : " ${ env.OUTPUT_DIR_RELATIVE} /test_logs.zip"
720+ )
721+ ]
722+ )
723+ ])
724+ // remove the big test logs zip file, store the nightlies url in test_logs.html
725+ sh ''' #!/bin/bash -e
726+ if [ -f "${OUTPUT_DIR}/test_logs.zip" ]; then
727+ echo "Remove ${OUTPUT_DIR}/test_logs.zip for saving space"
728+ rm -rf "${OUTPUT_DIR}/test_logs.zip"
729+ python3 ${BASEDIR}/dev-support/gen_redirect_html.py "${ASF_NIGHTLIES_BASE}/${OUTPUT_DIR_RELATIVE}" > "${OUTPUT_DIR}/test_logs.html"
730+ else
731+ echo "No test_logs.zip, skipping"
732+ fi
733+ '''
734+ // Has to be relative to WORKSPACE.
735+ archiveArtifacts artifacts : " ${ env.OUTPUT_DIR_RELATIVE} /*"
736+ archiveArtifacts artifacts : " ${ env.OUTPUT_DIR_RELATIVE} /**/*"
737+ publishHTML target : [
738+ allowMissing : true ,
739+ keepAll : true ,
740+ alwaysLinkToLastBuild : true ,
741+ // Has to be relative to WORKSPACE.
742+ reportDir : " ${ env.OUTPUT_DIR_RELATIVE} " ,
743+ reportFiles : ' console-report.html' ,
744+ reportName : ' JDK17 Nightly Build Report (Hadoop3)'
745+ ]
746+ }
747+ }
748+ }
749+
631750 // This is meant to mimic what a release manager will do to create RCs.
632751 // See http://hbase.apache.org/book.html#maven.release
633752 // TODO (HBASE-23870): replace this with invocation of the release tool
0 commit comments