@@ -15,7 +15,6 @@ SLACK_TOKEN=${SLACK_TOKEN:-""}
1515SLACK_CHANNEL=${SLACK_CHANNEL:- " #github" }
1616SLACK_USER=${SLACK_USER:- " NCSA Build" }
1717
18- source ./my_env.sh
1918
2019post_message () {
2120 printf " $1 \n"
@@ -55,8 +54,7 @@ while [ $FILE_UPLOADED = 0 ]; do
5554 echo " File upload not PROCESSED after 2 minutes. There may be a problem. Deleting dataset."
5655 curl -X DELETE $CLOWDER_URL /api/datasets/$DATASET_ID ? key=$CLOWDER_KEY
5756 post_message " Upload+extract test script failing on $CLOWDER_URL \/files\/$FILE_ID (status is not PROCESSED)"
58- export SUCCESS=0
59- env > ./my_env.sh
57+ rm memoryfile
6058 exit 1
6159 fi
6260 echo " File upload not complete; checking again in 10 seconds."
@@ -86,26 +84,24 @@ while [ $FILE_EXTRACTED -eq 0 ]; do
8684 echo " File extraction not DONE after 4 minutes. There may be a problem. Deleting dataset."
8785 curl -X DELETE $CLOWDER_URL /api/datasets/$DATASET_ID ? key=$CLOWDER_KEY
8886 post_message " Upload+extract test script failing on $CLOWDER_URL /files/$FILE_ID (extractor not DONE)"
89- export SUCCESS=0
90- env > ./my_env.sh
87+ rm memoryfile
9188 exit 1
9289 fi
9390 echo " File extraction not complete; checking again in 10 seconds."
9491 sleep 10
9592done
9693echo " File extraction complete."
9794
98- nsuccess=$(( $SUCCESS + 1 ))
99- if [ $nsuccess = 12 ]; then
100- nsuccess=0
101- post_message " Upload+extract test script continuous 24 hours success!"
95+ today=$( date +' %Y-%m-%d' )
96+ if [ ! -e memoryfile ]; then
97+ post_message " Upload+extract test script success!"
98+ elif [ " $( cat memoryfile) " != " $today " ]; then
99+ post_message " Upload+extract test script success!"
102100fi
103101
104- export SUCCESS=$nsuccess
105- env > ./my_env.sh
106102
107103# ------------------------ Delete dataset ------------------------
108104curl -X DELETE $CLOWDER_URL /api/datasets/$DATASET_ID ? key=$CLOWDER_KEY
109105
110106
111- echo " Test complete."
107+ echo " Test complete."
0 commit comments