hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [3/5] hbase git commit: HBASE-19184 Update nightly source artifact check to use git archive for making the tarball.
Date Thu, 09 Nov 2017 15:05:17 GMT
HBASE-19184 Update nightly source artifact check to use git archive for making the tarball.

Signed-off-by: Apekshit Sharma <appy@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9ae75667
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9ae75667
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9ae75667

Branch: refs/heads/branch-1.3
Commit: 9ae75667c43eae6bbc5d3b52a6117b0fd5971cce
Parents: 5571948
Author: Sean Busbey <busbey@apache.org>
Authored: Mon Nov 6 14:14:18 2017 -0600
Committer: Sean Busbey <busbey@apache.org>
Committed: Thu Nov 9 09:04:42 2017 -0600

----------------------------------------------------------------------
 dev-support/hbase_nightly_source-artifact.sh | 41 +++++++++++++----------
 1 file changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9ae75667/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 4e4c6a2..c66c41b 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -125,38 +125,31 @@ 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..."
-mvn --batch-mode -DskipTests clean >"${working_dir}/component_clean_before.log" 2>&1
-echo "Step 3 Build the source tarball"
-mvn -Prelease --batch-mode -Dmaven.repo.local="${m2_initial}" install -DskipTests assembly:single
\
-    -Dassembly.file=hbase-assembly/src/main/assembly/src.xml \
+git clean -xdfff >"${working_dir}/component_git_clean.log" 2>&1
+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 \
     >"${working_dir}/component_build_src_tarball.log" 2>&1
 
 cd "${unpack_dir}"
 echo "Unpack the source tarball"
-tar --strip-components=1 -xzf "${component_dir}"/hbase-assembly/target/hbase-*-src.tar.gz
\
+tar --strip-components=1 -xzf "${working_dir}/hbase-src.tar.gz" \
     >"${working_dir}/srctarball_unpack.log" 2>&1
-echo "Building from source artifact."
-mvn -DskipTests -Prelease --batch-mode -Dmaven.repo.local="${m2_tarbuild}" clean install
\
-    assembly:single >"${working_dir}/srctarball_install.log" 2>&1
-
-echo "Clean up after checking ability to build."
-mvn -DskipTests --batch-mode clean >"${working_dir}/srctarball_clean.log" 2>&1
-
 
 cd "${component_dir}"
-echo "Clean up the source checkout"
-mvn --batch-mode -DskipTests clean >"${working_dir}/component_clean_after.log" 2>&1
 echo "Diff against source tree"
 diff --binary --recursive . "${unpack_dir}" >"${working_dir}/diff_output" || true
 
 cd "${working_dir}"
 # expectation check largely based on HBASE-14952
-echo "Checking against things we don't expect to include in the source tarball (git related,
hbase-native-client, etc.)"
+echo "Checking against things we don't expect to include in the source tarball (git related,
etc.)"
+# Add in lines to show differences between the source tarball and this branch, in the same
format diff would give.
+# e.g. prior to HBASE-19152 we'd have the following lines (ignoring the bash comment marker):
+#Only in .: .gitattributes
+#Only in .: .gitignore
+#Only in .: hbase-native-client
 cat >known_excluded <<END
 Only in .: .git
-Only in .: .gitattributes
-Only in .: .gitignore
-Only in .: hbase-native-client
 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."
@@ -166,3 +159,15 @@ if ! diff known_excluded diff_output >"${working_dir}/unexpected.diff"
; then
 else
   echo "Everything looks as expected."
 fi
+
+cd "${unpack_dir}"
+echo "Follow the ref guide section on making a RC: Step 8 Build the binary tarball."
+if mvn -DskipTests -Prelease --batch-mode -Dmaven.repo.local="${m2_tarbuild}" clean install
\
+    assembly:single >"${working_dir}/srctarball_install.log" 2>&1; then
+  echo "Building a binary tarball from the source tarball succeeded."
+else
+  echo "Building a binary tarball from the source tarball failed. see srtarball_install.log
for details."
+  exit 1
+fi
+
+# TODO check the layout of the binary artifact we just made.


Mime
View raw message