HADOOP-14602. allow custom release notes/changelog during create-release
Signed-off-by: Chris Douglas <cdouglas@apache.org>
This commit is contained in:
parent
16c8dbde57
commit
0c52da7d3e
@ -50,6 +50,7 @@ function hadoop_abs
|
|||||||
declare obj=$1
|
declare obj=$1
|
||||||
declare dir
|
declare dir
|
||||||
declare fn
|
declare fn
|
||||||
|
declare ret
|
||||||
|
|
||||||
if [[ ! -e ${obj} ]]; then
|
if [[ ! -e ${obj} ]]; then
|
||||||
return 1
|
return 1
|
||||||
@ -62,7 +63,8 @@ function hadoop_abs
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dir=$(cd -P -- "${dir}" >/dev/null 2>/dev/null && pwd -P)
|
dir=$(cd -P -- "${dir}" >/dev/null 2>/dev/null && pwd -P)
|
||||||
if [[ $? = 0 ]]; then
|
ret=$?
|
||||||
|
if [[ ${ret} = 0 ]]; then
|
||||||
echo "${dir}${fn}"
|
echo "${dir}${fn}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -287,6 +289,7 @@ function usage
|
|||||||
echo "--mvncache=[path] Path to the maven cache to use"
|
echo "--mvncache=[path] Path to the maven cache to use"
|
||||||
echo "--native Also build the native components"
|
echo "--native Also build the native components"
|
||||||
echo "--rc-label=[label] Add this label to the builds"
|
echo "--rc-label=[label] Add this label to the builds"
|
||||||
|
echo "--security Emergency security release"
|
||||||
echo "--sign Use .gnupg dir to sign the artifacts and jars"
|
echo "--sign Use .gnupg dir to sign the artifacts and jars"
|
||||||
echo "--version=[version] Use an alternative version string"
|
echo "--version=[version] Use an alternative version string"
|
||||||
}
|
}
|
||||||
@ -330,6 +333,9 @@ function option_parse
|
|||||||
--rc-label=*)
|
--rc-label=*)
|
||||||
RC_LABEL=${i#*=}
|
RC_LABEL=${i#*=}
|
||||||
;;
|
;;
|
||||||
|
--security)
|
||||||
|
SECURITYRELEASE=true
|
||||||
|
;;
|
||||||
--sign)
|
--sign)
|
||||||
SIGN=true
|
SIGN=true
|
||||||
;;
|
;;
|
||||||
@ -397,6 +403,14 @@ function option_parse
|
|||||||
MVN_ARGS=("-Dmaven.repo.local=${MVNCACHE}")
|
MVN_ARGS=("-Dmaven.repo.local=${MVNCACHE}")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${SECURITYRELEASE}" = true ]]; then
|
||||||
|
if [[ ! -d "${BASEDIR}/hadoop-common-project/hadoop-common/src/site/markdown/release/${HADOOP_VERSION}" ]]; then
|
||||||
|
hadoop_error "ERROR: ${BASEDIR}/hadoop-common-project/hadoop-common/src/site/markdown/release/${HADOOP_VERSION} does not exist."
|
||||||
|
hadoop_error "ERROR: This directory and its contents are required to be manually created for a security release."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function dockermode
|
function dockermode
|
||||||
@ -523,7 +537,7 @@ function makearelease
|
|||||||
big_console_header "Maven Build and Install"
|
big_console_header "Maven Build and Install"
|
||||||
|
|
||||||
if [[ "${SIGN}" = true ]]; then
|
if [[ "${SIGN}" = true ]]; then
|
||||||
signflags=("-Psign" "-Dgpg.useagent=true" -Dgpg.executable="${GPG}")
|
signflags=("-Psign" "-Dgpg.useagent=true" "-Dgpg.executable=${GPG}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create SRC and BIN tarballs for release,
|
# Create SRC and BIN tarballs for release,
|
||||||
@ -534,6 +548,14 @@ function makearelease
|
|||||||
"${signflags[@]}" \
|
"${signflags[@]}" \
|
||||||
-DskipTests -Dtar $(hadoop_native_flags)
|
-DskipTests -Dtar $(hadoop_native_flags)
|
||||||
|
|
||||||
|
if [[ "${SECURITYRELEASE}" = true ]]; then
|
||||||
|
DOCFLAGS="-Pdocs"
|
||||||
|
hadoop_error "WARNING: Skipping automatic changelog and release notes generation due to --security"
|
||||||
|
else
|
||||||
|
DOCFLAGS="-Preleasedocs,docs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Create site for release
|
# Create site for release
|
||||||
# we need to do install again so that jdiff and
|
# we need to do install again so that jdiff and
|
||||||
# a few other things get registered in the maven
|
# a few other things get registered in the maven
|
||||||
@ -542,7 +564,8 @@ function makearelease
|
|||||||
"${MVN}" "${MVN_ARGS[@]}" install \
|
"${MVN}" "${MVN_ARGS[@]}" install \
|
||||||
site site:stage \
|
site site:stage \
|
||||||
-DskipTests \
|
-DskipTests \
|
||||||
-Pdist,src,releasedocs,docs
|
-Pdist,src \
|
||||||
|
"${DOCFLAGS}"
|
||||||
|
|
||||||
big_console_header "Staging the release"
|
big_console_header "Staging the release"
|
||||||
|
|
||||||
@ -586,6 +609,7 @@ function makearelease
|
|||||||
function signartifacts
|
function signartifacts
|
||||||
{
|
{
|
||||||
declare i
|
declare i
|
||||||
|
declare ret
|
||||||
|
|
||||||
if [[ "${SIGN}" = false ]]; then
|
if [[ "${SIGN}" = false ]]; then
|
||||||
for i in ${ARTIFACTS_DIR}/*; do
|
for i in ${ARTIFACTS_DIR}/*; do
|
||||||
@ -612,7 +636,8 @@ function signartifacts
|
|||||||
${GPG} --verify --trustdb "${BASEDIR}/target/testkeysdb" \
|
${GPG} --verify --trustdb "${BASEDIR}/target/testkeysdb" \
|
||||||
"${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz.asc" \
|
"${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz.asc" \
|
||||||
"${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz"
|
"${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz"
|
||||||
if [[ $? != 0 ]]; then
|
ret=$?
|
||||||
|
if [[ ${ret} != 0 ]]; then
|
||||||
hadoop_error "ERROR: GPG key is not present in ${PUBKEYFILE}."
|
hadoop_error "ERROR: GPG key is not present in ${PUBKEYFILE}."
|
||||||
hadoop_error "ERROR: This MUST be fixed. Exiting."
|
hadoop_error "ERROR: This MUST be fixed. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
@ -641,6 +666,7 @@ if [[ "${INDOCKER}" = true || "${DOCKERRAN}" = false ]]; then
|
|||||||
startgpgagent
|
startgpgagent
|
||||||
|
|
||||||
makearelease
|
makearelease
|
||||||
|
releaseret=$?
|
||||||
|
|
||||||
signartifacts
|
signartifacts
|
||||||
|
|
||||||
@ -651,7 +677,7 @@ if [[ "${INDOCKER}" = true ]]; then
|
|||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ ${releaseret} == 0 ]]; then
|
||||||
echo
|
echo
|
||||||
echo "Congratulations, you have successfully built the release"
|
echo "Congratulations, you have successfully built the release"
|
||||||
echo "artifacts for Apache Hadoop ${HADOOP_VERSION}${RC_LABEL}"
|
echo "artifacts for Apache Hadoop ${HADOOP_VERSION}${RC_LABEL}"
|
||||||
|
Loading…
Reference in New Issue
Block a user