Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 5 additions & 84 deletions dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pipeline {
OUTPUT_DIR_RELATIVE_JDK11_HADOOP3 = 'output-jdk11-hadoop3'
OUTPUT_DIR_RELATIVE_JDK17_HADOOP3 = 'output-jdk17-hadoop3'
OUTPUT_DIR_RELATIVE_JDK21_HADOOP3 = 'output-jdk21-hadoop3'
OUTPUT_DIR_RELATIVE_READ_REPLICA = 'output-read-replica'

PROJECT = 'hbase'
PROJECT_PERSONALITY = 'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
Expand Down Expand Up @@ -138,7 +137,6 @@ pipeline {
stash name: 'jdk11-hadoop3-result', allowEmpty: true, includes: "${OUTPUT_DIR_RELATIVE_JDK11_HADOOP3}/doesn't-match"
stash name: 'jdk17-hadoop3-result', allowEmpty: true, includes: "${OUTPUT_DIR_RELATIVE_JDK17_HADOOP3}/doesn't-match"
stash name: 'jdk21-hadoop3-result', allowEmpty: true, includes: "${OUTPUT_DIR_RELATIVE_JDK21_HADOOP3}/doesn't-match"
stash name: 'read-replica-result', allowEmpty: true, includes: "${OUTPUT_DIR_RELATIVE_READ_REPLICA}/doesn't-match"
}
}
stage ('health checks') {
Expand Down Expand Up @@ -323,7 +321,7 @@ pipeline {
else
echo "No archiver directory, skipping compressing."
fi
'''
'''
sshPublisher(publishers: [
sshPublisherDesc(configName: 'Nightlies',
transfers: [
Expand All @@ -342,7 +340,7 @@ pipeline {
else
echo "No test_logs.zip, skipping"
fi
'''
'''
// Has to be relative to WORKSPACE.
archiveArtifacts artifacts: "${env.OUTPUT_DIR_RELATIVE}/*"
archiveArtifacts artifacts: "${env.OUTPUT_DIR_RELATIVE}/**/*"
Expand Down Expand Up @@ -436,7 +434,7 @@ pipeline {
else
echo "No archiver directory, skipping compressing."
fi
'''
'''
sshPublisher(publishers: [
sshPublisherDesc(configName: 'Nightlies',
transfers: [
Expand All @@ -455,7 +453,7 @@ pipeline {
else
echo "No test_logs.zip, skipping"
fi
'''
'''
// Has to be relative to WORKSPACE.
archiveArtifacts artifacts: "${env.OUTPUT_DIR_RELATIVE}/*"
archiveArtifacts artifacts: "${env.OUTPUT_DIR_RELATIVE}/**/*"
Expand Down Expand Up @@ -584,6 +582,7 @@ pipeline {
}
}
}

stage ('yetus jdk17 hadoop3 checks') {
agent {
node {
Expand Down Expand Up @@ -804,81 +803,6 @@ pipeline {
}
}
}
stage ('hbase read-replica feature checks') {
agent {
node {
label 'hbase'
}
}
when {
anyOf {
branch 'master'
branch 'branch-3'
}
}
environment {
BASEDIR = "${env.WORKSPACE}/component"
OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_READ_REPLICA}"
OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_READ_REPLICA}"
}
steps {
sh '''#!/usr/bin/env bash
set -e
rm -rf "${OUTPUT_DIR}" && mkdir -p "${OUTPUT_DIR}"
echo '(x) {color:red}-1 read-replica checks{color}' >"${OUTPUT_DIR}/commentfile"
echo "-- Something went wrong running this stage, please [check relevant console output|${BUILD_URL}/console]." >> "${OUTPUT_DIR}/commentfile"
'''
dir('component') {
checkout scm
}
sh '''#!/usr/bin/env bash
set -e
rm -rf "${OUTPUT_DIR}/machine" && mkdir -p "${OUTPUT_DIR}/machine"
"${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"
'''
script {
def ret = sh(
returnStatus: true,
script: '''#!/usr/bin/env bash
set -e
declare -i status=0
if "${BASEDIR}/dev-support/hbase_nightly_read_replica_test.sh" ; then
echo '(/) {color:green}+1 read-replica checks{color}' > "${OUTPUT_DIR}/commentfile"
else
echo '(x) {color:red}-1 read-replica checks{color}' > "${OUTPUT_DIR}/commentfile"
status=1
fi
echo "-- For more information [see read-replica test report|${BUILD_URL}Read_20Replica_20Nightly_20Test_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 {
junit testResults: "${env.OUTPUT_DIR_RELATIVE}/read-replica-nightly-test-results.xml", allowEmptyResults: true

publishHTML target: [
allowMissing : true,
keepAll : true,
alwaysLinkToLastBuild: true,
reportDir : "${env.OUTPUT_DIR_RELATIVE}",
reportFiles : 'read-replica-nightly-test-report.html',
reportName : 'Read Replica Nightly Test Report'
]

stash name: 'read-replica-result', includes: "${OUTPUT_DIR_RELATIVE}/commentfile"
archiveArtifacts artifacts: "${env.OUTPUT_DIR_RELATIVE}/**/*", allowEmptyArchive: true
}
}
}
} // parallel
} //stage:_health checks
} //stages
Expand All @@ -896,23 +820,20 @@ pipeline {
rm -rf ${OUTPUT_DIR_RELATIVE_JDK11_HADOOP3}
rm -rf ${OUTPUT_DIR_RELATIVE_JDK17_HADOOP3}
rm -rf ${OUTPUT_DIR_RELATIVE_JDK21_HADOOP3}
rm -rf ${OUTPUT_DIR_RELATIVE_READ_REPLICA}
'''
unstash 'general-result'
unstash 'jdk8-hadoop2-result'
unstash 'jdk8-hadoop3-result'
unstash 'jdk11-hadoop3-result'
unstash 'jdk17-hadoop3-result'
unstash 'jdk21-hadoop3-result'
unstash 'read-replica-result'

def results = ["${env.OUTPUT_DIR_RELATIVE_GENERAL}/commentfile",
"${env.OUTPUT_DIR_RELATIVE_JDK8_HADOOP2}/commentfile",
"${env.OUTPUT_DIR_RELATIVE_JDK8_HADOOP3}/commentfile",
"${env.OUTPUT_DIR_RELATIVE_JDK11_HADOOP3}/commentfile",
"${env.OUTPUT_DIR_RELATIVE_JDK17_HADOOP3}/commentfile",
"${env.OUTPUT_DIR_RELATIVE_JDK21_HADOOP3}/commentfile"]
"${env.OUTPUT_DIR_RELATIVE_READ_REPLICA}/commentfile"]
echo env.BRANCH_NAME
echo env.BUILD_URL
echo currentBuild.result
Expand Down
9 changes: 3 additions & 6 deletions dev-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ configurations in this directory:

- `docker/` -- Dockerfile for CI build environment
- `hbase_docker/`, `hbase_docker.sh` -- Docker-based local test cluster
- `hbase_nightly_read_replica_test.sh` -- Builds a Docker image and runs two
HBase clusters (primary + read-replica) to execute end-to-end replication
integration tests via pytest. Optional `--keep-containers` and `--keep-image`
flags skip cleanup on exit.
- `read-replica/` -- Python test suite, Docker Compose configuration, and
cluster config used by `hbase_nightly_read_replica_test.sh`
- `read-replica/` -- Standalone Jenkins pipeline, test driver script
(`hbase_nightly_read_replica_test.sh`), Python test suite, Docker Compose
configuration, and cluster config for read-replica integration tests
- `adhoc_run_tests/` -- Scripts for running test suites outside CI
- `integration-test/` -- Integration test support

Expand Down
8 changes: 0 additions & 8 deletions dev-support/read-replica/.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,11 @@
HBASE_IMAGE=${HBASE_IMAGE:-kgeisz/hbase-docker:read-replica-jenkins}
# The name of the HBase docker container
HBASE_CONTAINER_NAME=hbase-docker
# This is the host running the hbase-docker containers. Use localhost if the containers
# are running locally. If they are started by another container, such as a Jenkins
# container in a Docker-out-of-Docker setup, then try setting this to host.docker.internal.
HBASE_HOST=${HBASE_HOST:-localhost}
# The directory within the docker container that contains the config files
HBASE_CONF_DIR=/opt/hbase/conf
# The directory containing the 'data-store/<hbase.rootdir>' directory.
# This directory is mounted with the HBase Docker container.
HBASE_DATA_STORE_ROOT=./tmp-read-replica-data
# The port for the active cluster's HBase UI (used for cluster readiness)
ACTIVE_CLUSTER_PORT=16010
# The port for the replica cluster's HBase UI (used for cluster readiness)
REPLICA_CLUSTER_PORT=26010
# Local path to the active cluster's HBase config file.
# This file is part of a mounted volume, so modifying it
# locally also modifies it within the container (and vise-versa).
Expand Down
Loading