HBASE-25085 Add support for java properties to hbase-vote.sh
Signed-off-by: Viraj Jasani <virajjasani@apache.org> Signed-off-by: Jan Hentschel <janh@apache.org> Signed-off-by: Tak-Lon (Stephen) Wu <taklwu@apache.org>
This commit is contained in:
parent
4e59014bed
commit
c86b0655a3
|
@ -29,7 +29,7 @@ hbase-vote. A script for standard vote which verifies the following items
|
||||||
4. Built from source
|
4. Built from source
|
||||||
5. Unit tests
|
5. Unit tests
|
||||||
|
|
||||||
Usage: ${SCRIPT} -s | --source <url> [-k | --key <signature>] [-f | --keys-file-url <url>] [-o | --output-dir </path/to/use>] [-P runSmallTests]
|
Usage: ${SCRIPT} -s | --source <url> [-k | --key <signature>] [-f | --keys-file-url <url>] [-o | --output-dir </path/to/use>] [-P runSmallTests] [-D property[=value]]
|
||||||
${SCRIPT} -h | --help
|
${SCRIPT} -h | --help
|
||||||
|
|
||||||
-h | --help Show this screen.
|
-h | --help Show this screen.
|
||||||
|
@ -40,24 +40,27 @@ Usage: ${SCRIPT} -s | --source <url> [-k | --key <signature>] [-f | --keys-file-
|
||||||
https://downloads.apache.org/hbase/KEYS
|
https://downloads.apache.org/hbase/KEYS
|
||||||
-o | --output-dir '</path>' directory which has the stdout and stderr of each verification target
|
-o | --output-dir '</path>' directory which has the stdout and stderr of each verification target
|
||||||
-P | list of maven profiles to activate for test UT/IT, i.e. <-P runSmallTests> Defaults to runAllTests
|
-P | list of maven profiles to activate for test UT/IT, i.e. <-P runSmallTests> Defaults to runAllTests
|
||||||
|
-D | list of maven properties to set for the mvn invocations, i.e. <-D hadoop.profile=3.0> Defaults to unset
|
||||||
__EOF
|
__EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((${#})); do
|
while ((${#})); do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-h | --help )
|
-h | --help )
|
||||||
usage; exit 0 ;;
|
usage; exit 0 ;;
|
||||||
-s | --source )
|
-s | --source )
|
||||||
SOURCE_URL="${2}"; shift 2 ;;
|
SOURCE_URL="${2}"; shift 2 ;;
|
||||||
-k | --key )
|
-k | --key )
|
||||||
SIGNING_KEY="${2}"; shift 2 ;;
|
SIGNING_KEY="${2}"; shift 2 ;;
|
||||||
-f | --keys-file-url )
|
-f | --keys-file-url )
|
||||||
KEY_FILE_URL="${2}"; shift 2 ;;
|
KEY_FILE_URL="${2}"; shift 2 ;;
|
||||||
-o | --output-dir )
|
-o | --output-dir )
|
||||||
OUTPUT_DIR="${2}"; shift 2 ;;
|
OUTPUT_DIR="${2}"; shift 2 ;;
|
||||||
-P )
|
-P )
|
||||||
MVN_ARGS="-P ${2}"; shift 2 ;;
|
MVN_PROFILES="-P ${2}"; shift 2 ;;
|
||||||
* )
|
-D )
|
||||||
|
MVN_PROPERTIES="-D ${2}"; shift 2 ;;
|
||||||
|
* )
|
||||||
usage >&2; exit 1 ;;
|
usage >&2; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -89,8 +92,8 @@ if [ ! -d "${OUTPUT_DIR}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Maven profile must be provided
|
# Maven profile must be provided
|
||||||
if [ -z "${MVN_ARGS}" ]; then
|
if [ -z "${MVN_PROFILES}" ]; then
|
||||||
MVN_ARGS="-P runAllTests"
|
MVN_PROFILES="-P runAllTests"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUTPUT_PATH_PREFIX="${OUTPUT_DIR}"/"${HBASE_RC_VERSION}"
|
OUTPUT_PATH_PREFIX="${OUTPUT_DIR}"/"${HBASE_RC_VERSION}"
|
||||||
|
@ -142,17 +145,17 @@ function unzip_from_source() {
|
||||||
|
|
||||||
function rat_test() {
|
function rat_test() {
|
||||||
rm -f "${OUTPUT_PATH_PREFIX}"_rat_test
|
rm -f "${OUTPUT_PATH_PREFIX}"_rat_test
|
||||||
mvn clean apache-rat:check 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_rat_test && RAT_CHECK_PASSED=1
|
mvn clean apache-rat:check "${MVN_PROPERTIES}" 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_rat_test && RAT_CHECK_PASSED=1
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_from_source() {
|
function build_from_source() {
|
||||||
rm -f "${OUTPUT_PATH_PREFIX}"_build_from_source
|
rm -f "${OUTPUT_PATH_PREFIX}"_build_from_source
|
||||||
mvn clean install -DskipTests 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_build_from_source && BUILD_FROM_SOURCE_PASSED=1
|
mvn clean install "${MVN_PROPERTIES}" -DskipTests 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_build_from_source && BUILD_FROM_SOURCE_PASSED=1
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_tests() {
|
function run_tests() {
|
||||||
rm -f "${OUTPUT_PATH_PREFIX}"_run_tests
|
rm -f "${OUTPUT_PATH_PREFIX}"_run_tests
|
||||||
mvn package "${MVN_ARGS}" -Dsurefire.rerunFailingTestsCount=3 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_run_tests && UNIT_TEST_PASSED=1
|
mvn package "${MVN_PROFILES}" "${MVN_PROPERTIES}" -Dsurefire.rerunFailingTestsCount=3 2>&1 | tee "${OUTPUT_PATH_PREFIX}"_run_tests && UNIT_TEST_PASSED=1
|
||||||
}
|
}
|
||||||
|
|
||||||
function execute() {
|
function execute() {
|
||||||
|
@ -164,11 +167,11 @@ function print_when_exit() {
|
||||||
* Signature: $( ((SIGNATURE_PASSED)) && echo "ok" || echo "failed" )
|
* Signature: $( ((SIGNATURE_PASSED)) && echo "ok" || echo "failed" )
|
||||||
* Checksum : $( ((CHECKSUM_PASSED)) && echo "ok" || echo "failed" )
|
* Checksum : $( ((CHECKSUM_PASSED)) && echo "ok" || echo "failed" )
|
||||||
* Rat check (${JAVA_VERSION}): $( ((RAT_CHECK_PASSED)) && echo "ok" || echo "failed" )
|
* Rat check (${JAVA_VERSION}): $( ((RAT_CHECK_PASSED)) && echo "ok" || echo "failed" )
|
||||||
- mvn clean apache-rat:check
|
- mvn clean apache-rat:check "${MVN_PROPERTIES}"
|
||||||
* Built from source (${JAVA_VERSION}): $( ((BUILD_FROM_SOURCE_PASSED)) && echo "ok" || echo "failed" )
|
* Built from source (${JAVA_VERSION}): $( ((BUILD_FROM_SOURCE_PASSED)) && echo "ok" || echo "failed" )
|
||||||
- mvn clean install -DskipTests
|
- mvn clean install -DskipTests "${MVN_PROPERTIES}"
|
||||||
* Unit tests pass (${JAVA_VERSION}): $( ((UNIT_TEST_PASSED)) && echo "ok" || echo "failed" )
|
* Unit tests pass (${JAVA_VERSION}): $( ((UNIT_TEST_PASSED)) && echo "ok" || echo "failed" )
|
||||||
- mvn package ${MVN_ARGS}
|
- mvn package ${MVN_PROFILES} "${MVN_PROPERTIES}" -Dsurefire.rerunFailingTestsCount=3
|
||||||
__EOF
|
__EOF
|
||||||
if ((CHECKSUM_PASSED)) && ((SIGNATURE_PASSED)) && ((RAT_CHECK_PASSED)) && ((BUILD_FROM_SOURCE_PASSED)) && ((UNIT_TEST_PASSED)) ; then
|
if ((CHECKSUM_PASSED)) && ((SIGNATURE_PASSED)) && ((RAT_CHECK_PASSED)) && ((BUILD_FROM_SOURCE_PASSED)) && ((UNIT_TEST_PASSED)) ; then
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ hbase-vote. A script for standard vote which verifies the following items
|
||||||
4. Built from source
|
4. Built from source
|
||||||
5. Unit tests
|
5. Unit tests
|
||||||
|
|
||||||
Usage: hbase-vote.sh -s | --source <url> [-k | --key <signature>] [-f | --keys-file-url <url>] [-o | --output-dir </path/to/use>]
|
Usage: hbase-vote.sh -s | --source <url> [-k | --key <signature>] [-f | --keys-file-url <url>] [-o | --output-dir </path/to/use>] [-P runSmallTests] [-D property[=value]]
|
||||||
hbase-vote.sh -h | --help
|
hbase-vote.sh -h | --help
|
||||||
|
|
||||||
-h | --help Show this screen.
|
-h | --help Show this screen.
|
||||||
|
@ -1162,6 +1162,8 @@ Usage: hbase-vote.sh -s | --source <url> [-k | --key <signature>] [-f | --keys-f
|
||||||
-f | --keys-file-url '<url>' the URL of the key file, default is
|
-f | --keys-file-url '<url>' the URL of the key file, default is
|
||||||
https://downloads.apache.org/hbase/KEYS
|
https://downloads.apache.org/hbase/KEYS
|
||||||
-o | --output-dir '</path>' directory which has the stdout and stderr of each verification target
|
-o | --output-dir '</path>' directory which has the stdout and stderr of each verification target
|
||||||
|
-P | list of maven profiles to activate for test UT/IT, i.e. <-P runSmallTests> Defaults to runAllTests
|
||||||
|
-D | list of maven properties to set for the mvn invocations, i.e. <-D hadoop.profile=3.0> Defaults to unset
|
||||||
----
|
----
|
||||||
* If you see any unit test failures, please call out the solo test result and whether it's part of flaky (nightly) tests dashboard, e.g. link:https://builds.apache.org/view/H-L/view/HBase/job/HBase-Find-Flaky-Tests/job/master/lastSuccessfulBuild/artifact/dashboard.html[dashboard of master branch] (please change the test branch accordingly).
|
* If you see any unit test failures, please call out the solo test result and whether it's part of flaky (nightly) tests dashboard, e.g. link:https://builds.apache.org/view/H-L/view/HBase/job/HBase-Find-Flaky-Tests/job/master/lastSuccessfulBuild/artifact/dashboard.html[dashboard of master branch] (please change the test branch accordingly).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue