You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2017/11/09 22:18:20 UTC
[4/5] hbase git commit: HBASE-19229 Nightly script to check source
artifact should not do a destructive git operation without opt-in
HBASE-19229 Nightly script to check source artifact should not do a destructive git operation without opt-in
Signed-off-by: Apekshit Sharma <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f3fa14cd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f3fa14cd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f3fa14cd
Branch: refs/heads/branch-1.2
Commit: f3fa14cdfda6855ef11859c8f2df5426351f42d1
Parents: d8318f1
Author: Sean Busbey <bu...@apache.org>
Authored: Thu Nov 9 13:22:09 2017 -0600
Committer: Sean Busbey <bu...@apache.org>
Committed: Thu Nov 9 16:17:47 2017 -0600
----------------------------------------------------------------------
dev-support/Jenkinsfile | 1 +
dev-support/hbase_nightly_source-artifact.sh | 15 +++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/f3fa14cd/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index f9c9159..6654923 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -290,6 +290,7 @@ curl -L -o personality.sh "${env.PROJET_PERSONALITY}"
--unpack-temp-dir unpacked_src_tarball \
--maven-m2-initial .m2-for-repo \
--maven-m2-src-build .m2-for-src \
+ --clean-source-checkout \
${env.BASEDIR}
"""
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/f3fa14cd/dev-support/hbase_nightly_source-artifact.sh
----------------------------------------------------------------------
diff --git a/dev-support/hbase_nightly_source-artifact.sh b/dev-support/hbase_nightly_source-artifact.sh
index c66c41b..375d121 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -28,6 +28,10 @@ function usage {
echo " component-dir."
echo " --maven-m2-src-build /path/to/use Path for maven artifacts while building from the"
echo " unpacked source tarball."
+ echo " --clean-source-checkout Destructively clean component checkout before"
+ echo " comparing to source tarball. N.B. will delete"
+ echo " anything in the checkout dir that isn't from"
+ echo " a git checkout, including ignored files."
exit 1
}
# if no args specified, show usage
@@ -41,6 +45,7 @@ declare unpack_dir
declare m2_initial
declare m2_tarbuild
declare working_dir
+declare source_clean
while [ $# -gt 0 ]
do
case "$1" in
@@ -48,6 +53,7 @@ do
--maven-m2-initial) shift; m2_initial=$1; shift;;
--maven-m2-src-build) shift; m2_tarbuild=$1; shift;;
--intermediate-file-dir) shift; working_dir=$1; shift;;
+ --clean-source-checkout) shift; source_clean="true";;
--) shift; break;;
-*) usage ;;
*) break;; # terminate while loop
@@ -124,8 +130,10 @@ mvn --version --offline | tee "${working_dir}/maven_version"
echo "Do a clean building of the source artifact using code in ${component_dir}"
cd "${component_dir}"
-echo "Clean..."
-git clean -xdfff >"${working_dir}/component_git_clean.log" 2>&1
+if [ -n "${source_clean}" ]; then
+ echo "Clean..."
+ git clean -xdfff >"${working_dir}/component_git_clean.log" 2>&1
+fi
echo "Follow the ref guide section on making a RC: Step 6 Build the source tarball"
git archive --format=tar.gz --output="${working_dir}/hbase-src.tar.gz" \
--prefix="hbase-SOMEVERSION/" HEAD \
@@ -153,6 +161,9 @@ Only in .: .git
END
if ! diff known_excluded diff_output >"${working_dir}/unexpected.diff" ; then
echo "Any output here are unexpected differences between the source artifact we'd make for an RC and the current branch."
+ echo "One potential source of differences is if you have an unclean working directory; you should expect to see"
+ echo "such extraneous files below."
+ echo ""
echo "The expected differences are on the < side and the current differences are on the > side."
echo "In a given set of differences, '.' refers to the branch in the repo and 'unpacked_src_tarball' refers to what we pulled out of the tarball."
diff known_excluded diff_output