You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gu...@apache.org on 2020/09/04 13:40:10 UTC

[lucene-solr] branch master updated: SOLR-14704 add download option to cloud.sh (#1715)

This is an automated email from the ASF dual-hosted git repository.

gus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 65da5ed  SOLR-14704 add download option to cloud.sh (#1715)
65da5ed is described below

commit 65da5ed32c940529b27a518deb8ffd1e61aa2e96
Author: Gus Heck <46...@users.noreply.github.com>
AuthorDate: Fri Sep 4 09:39:23 2020 -0400

    SOLR-14704 add download option to cloud.sh (#1715)
---
 solr/cloud-dev/cloud.sh | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/solr/cloud-dev/cloud.sh b/solr/cloud-dev/cloud.sh
index 3b6d710..2ae7cbb 100644
--- a/solr/cloud-dev/cloud.sh
+++ b/solr/cloud-dev/cloud.sh
@@ -25,6 +25,7 @@
 #  -n <num>          number of nodes to create/start if this doesn't match error
 #  -w <path>         path to the vcs checkout
 #  -z <num>          port to look for zookeeper on (2181 default)
+#  -d <url>          Download solr tarball from this URL
 #
 # Commands:
 #   new              Create a new cluster named by the current date or [name]
@@ -109,7 +110,7 @@ NUM_NODES=0      # need to detect if not specified
 VCS_WORK=${DEFAULT_VCS_WORKSPACE}
 ZK_PORT=2181
 
-while getopts ":crm:a:n:w:z:" opt; do
+while getopts ":crm:a:n:w:z:d:" opt; do
   case ${opt} in
     c)
       CLEAN=true
@@ -132,6 +133,9 @@ while getopts ":crm:a:n:w:z:" opt; do
     z)
       ZK_PORT=$OPTARG
       ;;
+    d)
+      SMOKE_RC_URL=$OPTARG
+      ;;
    \?)
       echo "Invalid option: -$OPTARG" >&2
       exit 1
@@ -267,17 +271,20 @@ recompileIfReq() {
 # Copy tarball #
 ################
 copyTarball() {
-    echo "foo"
     pushd ${CLUSTER_WD}
-    echo "bar"
     rm -rf solr-*  # remove tarball and dir to which it extracts
-    echo "baz"
     pushd # back to original dir to properly resolve vcs working dir
-    echo "foobar:"$(pwd)
-    if [[ ! -f $(ls "$VCS_WORK"/solr/package/solr-*.tgz) ]]; then
-      echo "No solr tarball found try again with -r"; popd; exit 10;
+    if [ ! -z "$SMOKE_RC_URL" ]; then
+      pushd ${CLUSTER_WD}
+      RC_FILE=$(echo "${SMOKE_RC_URL}" | rev | cut -d '/' -f 1 | rev)
+      curl -o "$RC_FILE" "$SMOKE_RC_URL"
+      pushd
+    else
+      if [[ ! -f $(ls "$VCS_WORK"/solr/package/solr-*.tgz) ]]; then
+        echo "No solr tarball found try again with -r"; popd; exit 10;
+      fi
+      cp "$VCS_WORK"/solr/package/solr-*.tgz ${CLUSTER_WD}
     fi
-    cp "$VCS_WORK"/solr/package/solr-*.tgz ${CLUSTER_WD}
     pushd # back into cluster wd to unpack
     tar xzvf solr-*.tgz
     popd