diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-ranger.sh b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-ranger.sh index 8fbce08fb5f9..54b2fff5ead7 100755 --- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-ranger.sh +++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-ranger.sh @@ -31,8 +31,10 @@ export OM_SERVICE_ID="omservice" export SCM=scm1.org export SECURITY_ENABLED=true -curl -LO https://downloads.apache.org/ranger/KEYS -gpg --import KEYS +if [[ "${SKIP_APACHE_VERIFY_DOWNLOAD}" != "true" ]]; then + curl -LO https://downloads.apache.org/ranger/KEYS + gpg --import KEYS +fi download_and_verify_apache_release "ranger/${RANGER_VERSION}/apache-ranger-${RANGER_VERSION}.tar.gz" tar -C "${DOWNLOAD_DIR}" -x -z -f "${DOWNLOAD_DIR}/apache-ranger-${RANGER_VERSION}.tar.gz" diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh index d7a4a29e84fd..0d2e01851c3e 100755 --- a/hadoop-ozone/dist/src/main/compose/testlib.sh +++ b/hadoop-ozone/dist/src/main/compose/testlib.sh @@ -30,6 +30,7 @@ source "${_testlib_dir}/../smoketest/testlib.sh" : ${OZONE_COMPOSE_RUNNING:=false} : ${SECURITY_ENABLED:=false} : ${SCM:=scm} +: ${SKIP_APACHE_VERIFY_DOWNLOAD:=${CI:-false}} # Check if running from output of Maven build or from source _is_build() { @@ -631,6 +632,8 @@ download_and_verify_apache_release() { local download_dir="${DOWNLOAD_DIR:-/tmp}" download_if_not_exists "${base_url}${remote_path}" "${download_dir}/${f}" - download_if_not_exists "${checksum_base_url}${remote_path}.asc" "${download_dir}/${f}.asc" - gpg --verify "${download_dir}/${f}.asc" "${download_dir}/${f}" || exit 1 + if [[ "${SKIP_APACHE_VERIFY_DOWNLOAD}" != "true" ]]; then + download_if_not_exists "${checksum_base_url}${remote_path}.asc" "${download_dir}/${f}.asc" + gpg --verify "${download_dir}/${f}.asc" "${download_dir}/${f}" || exit 1 + fi }