onichols-pivotal commented on a change in pull request #7291:
URL: https://github.com/apache/geode/pull/7291#discussion_r790056181
##########
File path: dev-tools/release-testing/smoketest_rc.sh
##########
@@ -0,0 +1,218 @@
+#!/bin/bash
+
+
+
+set -e
+
+usage() {
+ echo "Usage: smoketest-rc.sh -v version_number -m maven_coordinates"
+ echo " -v The #.#.#.RC# version number"
+ echo " -m The maven url to download artifacts from"
+ exit 1
+}
+
+checkCommand() {
+ COMMAND=$1
+ if ! [[ -x "$(command -v $COMMAND)" ]]; then
+ echo "$COMMAND must be installed"
+ exit 1
+ fi
+}
+
+FULL_VERSION=""
+MAVEN_URL=""
+
+while getopts ":v:m:" opt; do
+ case ${opt} in
+ v )
+ FULL_VERSION=$OPTARG
+ ;;
+ m )
+ MAVEN_URL=$OPTARG
+ ;;
+ \? )
+ usage
+ ;;
+ esac
+done
+
+if [[ ${FULL_VERSION} == "" ]] || [[ ${MAVEN_URL} == "" ]]; then
+ usage
+fi
+
+if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
+ VERSION=${BASH_REMATCH[1]}
+else
+ echo "Malformed version number ${FULL_VERSION}. Example valid version:
1.9.0.RC1"
+ exit 1
+fi
+
+VERSION_MM=${VERSION%.*}
+
+checkCommand gpg
+checkCommand wget
+
+#These will be required for building native from source
+#checkCommand cmake
+#checkCommand doxygen
+
+
+echo ""
+echo "============================================================"
+echo "Checking java..."
+echo "============================================================"
+[ -z "$JAVA_HOME" ] && JAVA=java || JAVA=$JAVA_HOME/bin/java
+if ! $JAVA -XshowSettings:properties -version 2>&1 | grep
'java.specification.version = 1.8' ; then
+ echo "Please set JAVA_HOME to use JDK 8 to compile Geode"
+ exit 1
+fi
+
+set -x
+WORKSPACE=$PWD/smoketest-release-${VERSION}-workspace
+GEODE=$WORKSPACE/geode
+GEODE_EXAMPLES=$WORKSPACE/geode-examples
+GEODE_NATIVE=$WORKSPACE/geode-native
+GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
+BREW_DIR=$WORKSPACE/homebrew-core
+SVN_DIR=$WORKSPACE/dist/dev/geode
+if which shasum >/dev/null; then
+ SHASUM="shasum -a 256"
+else
+ SHASUM=sha256sum
+fi
+set +x
+
+
+function failMsg1 {
+ echo "ERROR: script did NOT complete successfully. Please try again."
+}
+trap failMsg1 ERR
+
+
+echo ""
+echo "============================================================"
+echo "Cleaning workspace directory..."
+echo "============================================================"
+set -x
+rm -rf $WORKSPACE
+mkdir -p $WORKSPACE
+set +x
+
+
+echo ""
+echo "============================================================"
+echo "Cloning repositories at the RC tag..."
+echo "============================================================"
+set -x
+cd $WORKSPACE
+mkdir src_clones
+cd src_clones
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode.git apache-geode-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-examples.git apache-geode-examples-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-native.git apache-geode-native-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-benchmarks.git
apache-geode-benchmarks-${VERSION}-src
+set +x
+
+
+echo ""
+echo "============================================================"
+echo "Downloading artifacts"
+echo "============================================================"
+DOWNLOAD_URL="https://dist.apache.org/repos/dist/dev/geode/$FULL_VERSION"
+set -x
+cd $WORKSPACE
+wget $DOWNLOAD_URL -m -np -nv
+set +x
+
+DOWNLOAD_DIR=$WORKSPACE/dist.apache.org/repos/dist/dev/geode/$FULL_VERSION
+echo ""
+echo "============================================================"
+echo "Untarring source releases"
+echo "============================================================"
+set -x
+cd $WORKSPACE
+mkdir -p src_releases
+cd src_releases
+ls $DOWNLOAD_DIR/*src.tgz | xargs -n1 -I {} bash -c "tar xzf {}"
+cd -
+set +x
+
+echo ""
+echo "============================================================"
+echo "Verifying Signatures"
Review comment:
if the script doesn't import the KEYS file automatically, maybe could at
least print a reminder for how the user might go about this esp if they get
error on this step
##########
File path: dev-tools/release-testing/smoketest_rc.sh
##########
@@ -0,0 +1,218 @@
+#!/bin/bash
+
+
+
+set -e
+
+usage() {
+ echo "Usage: smoketest-rc.sh -v version_number -m maven_coordinates"
+ echo " -v The #.#.#.RC# version number"
+ echo " -m The maven url to download artifacts from"
+ exit 1
+}
+
+checkCommand() {
+ COMMAND=$1
+ if ! [[ -x "$(command -v $COMMAND)" ]]; then
+ echo "$COMMAND must be installed"
+ exit 1
+ fi
+}
+
+FULL_VERSION=""
+MAVEN_URL=""
+
+while getopts ":v:m:" opt; do
+ case ${opt} in
+ v )
+ FULL_VERSION=$OPTARG
+ ;;
+ m )
+ MAVEN_URL=$OPTARG
+ ;;
+ \? )
+ usage
+ ;;
+ esac
+done
+
+if [[ ${FULL_VERSION} == "" ]] || [[ ${MAVEN_URL} == "" ]]; then
+ usage
+fi
+
+if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
+ VERSION=${BASH_REMATCH[1]}
+else
+ echo "Malformed version number ${FULL_VERSION}. Example valid version:
1.9.0.RC1"
+ exit 1
+fi
+
+VERSION_MM=${VERSION%.*}
+
+checkCommand gpg
+checkCommand wget
+
+#These will be required for building native from source
+#checkCommand cmake
+#checkCommand doxygen
+
+
+echo ""
+echo "============================================================"
+echo "Checking java..."
+echo "============================================================"
+[ -z "$JAVA_HOME" ] && JAVA=java || JAVA=$JAVA_HOME/bin/java
+if ! $JAVA -XshowSettings:properties -version 2>&1 | grep
'java.specification.version = 1.8' ; then
+ echo "Please set JAVA_HOME to use JDK 8 to compile Geode"
+ exit 1
+fi
+
+set -x
+WORKSPACE=$PWD/smoketest-release-${VERSION}-workspace
+GEODE=$WORKSPACE/geode
+GEODE_EXAMPLES=$WORKSPACE/geode-examples
+GEODE_NATIVE=$WORKSPACE/geode-native
+GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
+BREW_DIR=$WORKSPACE/homebrew-core
+SVN_DIR=$WORKSPACE/dist/dev/geode
+if which shasum >/dev/null; then
+ SHASUM="shasum -a 256"
+else
+ SHASUM=sha256sum
+fi
+set +x
+
+
+function failMsg1 {
+ echo "ERROR: script did NOT complete successfully. Please try again."
+}
+trap failMsg1 ERR
+
+
+echo ""
+echo "============================================================"
+echo "Cleaning workspace directory..."
+echo "============================================================"
+set -x
+rm -rf $WORKSPACE
+mkdir -p $WORKSPACE
+set +x
+
+
+echo ""
+echo "============================================================"
+echo "Cloning repositories at the RC tag..."
+echo "============================================================"
+set -x
+cd $WORKSPACE
+mkdir src_clones
+cd src_clones
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode.git apache-geode-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-examples.git apache-geode-examples-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-native.git apache-geode-native-${VERSION}-src
+git clone --depth=1 --branch=rel/v${FULL_VERSION}
[email protected]:apache/geode-benchmarks.git
apache-geode-benchmarks-${VERSION}-src
+set +x
+
+
+echo ""
+echo "============================================================"
+echo "Downloading artifacts"
+echo "============================================================"
+DOWNLOAD_URL="https://dist.apache.org/repos/dist/dev/geode/$FULL_VERSION"
+set -x
+cd $WORKSPACE
+wget $DOWNLOAD_URL -m -np -nv
+set +x
+
+DOWNLOAD_DIR=$WORKSPACE/dist.apache.org/repos/dist/dev/geode/$FULL_VERSION
+echo ""
+echo "============================================================"
+echo "Untarring source releases"
+echo "============================================================"
+set -x
+cd $WORKSPACE
+mkdir -p src_releases
+cd src_releases
+ls $DOWNLOAD_DIR/*src.tgz | xargs -n1 -I {} bash -c "tar xzf {}"
+cd -
+set +x
+
+echo ""
+echo "============================================================"
+echo "Verifying Signatures"
+echo "============================================================"
+
+set -x
+cd $WORKSPACE
Review comment:
seems to be redundant as the next line is a cd to an absolute path
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]