Skip to content
Permalink
Browse files

add validate explorers, ver check node, cleanup

Signed-off-by: Nakul Manchanda <nakul.manchanda@ibm.com>
  • Loading branch information
NakulManchanda committed Oct 24, 2019
1 parent 20bcf6e commit 04286e52cccb2fbe939e8c095ea07ef795e2323e
Showing with 31 additions and 26 deletions.
  1. +3 −3 manifest.json.template
  2. +0 −3 scripts/run-zowe.template.sh
  3. +22 −13 scripts/utils/validateNode.sh
  4. +6 −7 scripts/zowe-install-explorer-ui.sh
@@ -53,13 +53,13 @@
"explode": "true"
},
"org.zowe.explorer-jes": {
"artifact": "libs-snapshot-local/org/zowe/explorer-jes/0.0.23-PR-111/explorer-jes-0.0.23-pr-111-15-20191021132511.pax"
"artifact": "libs-snapshot-local/org/zowe/explorer-jes/0.0.23-PR-111/explorer-jes-0.0.23-pr-111-16-20191024160222.pax"
},
"org.zowe.explorer-mvs": {
"artifact":"libs-snapshot-local/org/zowe/explorer-mvs/0.0.16-PR-91/explorer-mvs-0.0.16-pr-91-9-20191021135230.pax"
"artifact":"libs-snapshot-local/org/zowe/explorer-mvs/0.0.16-PR-91/explorer-mvs-0.0.16-pr-91-10-20191024160404.pax"
},
"org.zowe.explorer-uss": {
"artifact": "libs-snapshot-local/org/zowe/explorer-uss/0.0.14-PR-58/explorer-uss-0.0.14-pr-58-10-20191021205608.pax"
"artifact": "libs-snapshot-local/org/zowe/explorer-uss/0.0.14-PR-58/explorer-uss-0.0.14-pr-58-11-20191024160422.pax"
},
"com.ca.mfaas.sdk.mfaas-zowe-install": {
"version": "~1.1.11-SNAPSHOT",
@@ -110,9 +110,6 @@ then
# Create the user configurable api-defs
STATIC_DEF_CONFIG_DIR=${USER_DIR}/api-mediation/api-defs
mkdir -p ${STATIC_DEF_CONFIG_DIR}

# Until ui explorers componentised will copy them from the old location
# cp ${ROOT_DIR}/components/api-mediation/api-defs/* ${STATIC_DEF_CONFIG_DIR}
fi

# Validate component properties if script exists
@@ -11,19 +11,28 @@
################################################################################

# NODE_HOME Should contain a valid install of Node
if [[ -n "${NODE_HOME}" ]]
if [[ -n "${NODE_HOME}" ]];
then
ls ${NODE_HOME}/bin | grep node$ > /dev/null
if [[ $? -ne 0 ]]
then
. ${ROOT_DIR}/scripts/utils/error.sh "NODE_HOM: ${NODE_HOME}/bin does not point to a valid install of Node"
else
NODE_OK=`${NODE_HOME}/bin/node -e "console.log('ok')" 2>&1`
if [[ ! $NODE_OK == "ok" ]]
then
. ${ROOT_DIR}/scripts/utils/error.sh "${NODE_HOME}/bin/node is not functioning correctly"
ls ${NODE_HOME}/bin | grep node$ > /dev/null
if [[ $? -ne 0 ]];
then
. ${ROOT_DIR}/scripts/utils/error.sh "NODE_HOME: ${NODE_HOME}/bin does not point to a valid install of Node";
else

NODE_OK=`${NODE_HOME}/bin/node -e "console.log('ok')" 2>&1`
if [[ ! $NODE_OK == "ok" ]];
then
. ${ROOT_DIR}/scripts/utils/error.sh "${NODE_HOME}/bin/node is not functioning correctly";
fi

NODE_MIN_VERSION=6.0
NODE_VERSION=`${NODE_HOME}/bin/node --version | sed 's/^.\{1\}//' | cut -d. -f1,2 2>&1`
if [[ `echo "$NODE_VERSION $NODE_MIN_VERSION" | awk '{print ($1 < $2)}'` == 1 ]];
then
. ${ROOT_DIR}/scripts/utils/error.sh "NODE Version ${NODE_VERSION} is less than minimum level required of ${NODE_MIN_VERSION}";
fi

fi
fi
else
. ${ROOT_DIR}/scripts/utils/error.sh "NODE_HOME is empty"
fi
. ${ROOT_DIR}/scripts/utils/error.sh "NODE_HOME is empty";
fi
@@ -42,10 +42,9 @@ for COMPONENT_ID in $UI_PLUGIN_LIST; do
echo " Unpax of ${EXPLORER_PLUGIN_PAX} into ${PWD}" >> $LOG_FILE
pax -rf $EXPLORER_PLUGIN_PAX -ppx

#TODO make sure scripts end up in files directory not bin.
EXPLORER_UI_START_SCRIPT=$EXPLORER_INSTALL_FOLDER/bin/scripts/explorer-${COMPONENT_ID}-start.sh
EXPLORER_UI_CONFIGURE_SCRIPT=$EXPLORER_INSTALL_FOLDER/bin/scripts/explorer-${COMPONENT_ID}-configure.sh
#EXPLORER_UI_VALIDATE_SCRIPT
EXPLORER_UI_VALIDATE_SCRIPT=$EXPLORER_INSTALL_FOLDER/bin/scripts/explorer-${COMPONENT_ID}-validate.sh

if [ ! -f $EXPLORER_UI_START_SCRIPT ]; then
echo " Error: Explorer ${COMPONENT_ID} ui start script (start-explorer-${COMPONENT_ID}-ui-server.sh) missing"
@@ -61,13 +60,13 @@ for COMPONENT_ID in $UI_PLUGIN_LIST; do
mv ${EXPLORER_UI_CONFIGURE_SCRIPT} configure.sh
fi

rm -rf $EXPLORER_INSTALL_FOLDER/bin/scripts
if [[ -f ${EXPLORER_UI_VALIDATE_SCRIPT} ]]
then
cp ${EXPLORER_UI_VALIDATE_SCRIPT} validate.sh
fi

rm -rf $EXPLORER_INSTALL_FOLDER/bin/scripts

# if [[ -f ${EXPLORER_UI_VALIDATE_SCRIPT} ]]
# then
# cp ${EXPLORER_UI_VALIDATE_SCRIPT} validate.sh
# fi
chmod -R 755 "${ZOWE_ROOT_DIR}/components/explorer-${COMPONENT_ID}/bin"

done

0 comments on commit 04286e5

Please sign in to comment.
You can’t perform that action at this time.