[mini-cluster] fix on building mini-cluster JAR

Prior to this patch, build_mini_cluster_binaries.sh script didn't
properly handle the case of running in the same workspace that
was used to build the mini-cluster JAR for prior releases.  That
might result in not building the required JAR, so no binary
content would be uploaded by running publish_mini_cluster_binaries.sh
script later on.

This patch fixes the issue: by default, the build directory
is re-created upon every run of the build_mini_cluster_binaries.sh
script unless MINI_CLUSTER_NO_FRESH_BUILD environment variable is set.
Also, even if MINI_CLUSTER_NO_FRESH_BUILD is set and the build directory
is not re-created, the script now warns on ambiguity when multiple
artifact directories are present.

Change-Id: Ic2d5c2a83e2a0ab959e2eb7898d47ab736cd1e1f
Reviewed-on: http://gerrit.cloudera.org:8080/14702
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>
(cherry picked from commit 6406123924c3900e8edd65eebbb3d93963fd2a7b)
Reviewed-on: http://gerrit.cloudera.org:8080/14728
Tested-by: Alexey Serbin <aserbin@cloudera.com>
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>
1 file changed