Skip to content
Snippets Groups Projects
Commit d798a01f authored by felmer's avatar felmer
Browse files

LMS-2471 improved version of nightly-upgrade-generic-openbis.sh

SVN: 22631
parent cd8d7dc7
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,30 @@
# - Restore store and databases from latest snapshot
# - Restart AS and DSS
#
echo "home directory: $PWD"
echo ":::::::::::::::::::: Nightly Upgrade Generic openBIS Servers [`date`] :::::::::::::::::::::"
LOG_FILE=sprint/openBIS-server/jetty/logs/openbis_log.txt
CURRENT_VERSION=UNKNOWN
if [ -f $LOG_FILE ]; then
CURRENT_VERSION=`awk '/OPERATION.CISDContextLoaderListener - Version/ {print $1" "$2" "$8" "$9}' $LOG_FILE | tail -1`
fi
echo "Current openBIS Application Server: $CURRENT_VERSION"
if [ "SNAPSHOT" != "`echo $CURRENT_VERSION|awk '{print $3}'`" ]; then
TIME_STAMP="`echo $CURRENT_VERSION|awk '{print $1, $2}'`"
echo $TIME_STAMP
WEEK=`date --date="$TIME_STAMP" "+%W"`
if [ $? -ne 0 ]; then
# Mac OSX has a different flavor of date command
WEEK=`date -j -f "%Y-%m-%d %H:%M:%S" "$TIME_STAMP" "+%W"`
fi
CURRENT_WEEK=`date "+%W"`
echo "$CURRENT_WEEK $WEEK"
if [ "$WEEK" = "$CURRENT_WEEK" ]; then
echo "Sprint server not replaced until next week."
exit
fi
fi
fetch-ci-artifacts.sh openbis
fetch-ci-artifacts.sh rtd_yeastx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment