github comment if preliminary step failed
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
7c84a9f929
commit
7e4711a23c
@ -13,23 +13,36 @@ ID=$3
|
|||||||
USER=$1
|
USER=$1
|
||||||
PASS=$2
|
PASS=$2
|
||||||
TYPE=$4
|
TYPE=$4
|
||||||
FOLDER=$ID-$TYPE
|
REMOTE_FOLDER=$ID-$TYPE
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ $TYPE = "IT" ]; then
|
if [ $TYPE = "IT" ]; then
|
||||||
cd build/reports/androidTests/connected/flavors/GPLAY
|
FOLDER=build/reports/androidTests/connected/flavors/GPLAY
|
||||||
elif [ $TYPE = "Unit" ]; then
|
elif [ $TYPE = "Unit" ]; then
|
||||||
cd build/reports/tests/testGplayDebugUnitTest
|
FOLDER=build/reports/tests/testGplayDebugUnitTest
|
||||||
else
|
else
|
||||||
cd build/reports/shot/verification/
|
FOLDER=build/reports/shot/verification/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$FOLDER/$(echo {} | sed s#\./##) \;
|
if [ ! -e $FOLDER ]; then
|
||||||
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
|
echo "$TYPE test failed, but no output was generated. Maybe a preliminary stage failed."
|
||||||
|
|
||||||
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$FOLDER"
|
curl -u $6:$7 \
|
||||||
|
-X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments \
|
||||||
|
-d "{ \"body\" : \"$TYPE test failed, but no output was generated. Maybe a preliminary stage failed. \" }"
|
||||||
|
|
||||||
curl -u $6:$7 -X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments -d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$FOLDER \" }"
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $FOLDER
|
||||||
|
|
||||||
|
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
|
||||||
|
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
|
||||||
|
|
||||||
|
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER"
|
||||||
|
|
||||||
|
curl -u $6:$7 -X POST https://api.github.com/repos/nextcloud/android/issues/$5/comments \
|
||||||
|
-d "{ \"body\" : \"$TYPE test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/$REMOTE_FOLDER \" }"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user