Merge pull request #3582 from nextcloud/showITurlOnError

Show IT Url on Error
This commit is contained in:
Andy Scherzinger 2019-02-07 08:51:09 +01:00 committed by GitHub
commit 43323e1669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View file

@ -15,13 +15,13 @@ pipeline:
- emulator -avd android-27 -no-window -no-audio &
- ./wait_for_emulator.sh
- ./gradlew assembleGplayDebug
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit"
- ./gradlew jacocoTestGplayDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installGplayDebugAndroidTest
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "IT"
- ./gradlew createGplayDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew combinedTestReport
- curl -o codecov.sh https://codecov.io/bash
- bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
secrets: [ LOG_USERNAME, LOG_PASSWORD ]
secrets: [ LOG_USERNAME, LOG_PASSWORD, GIT_USERNAME, GIT_TOKEN ]
when:
matrix:
FLAVOR: Gplay

View file

@ -74,7 +74,7 @@ else
fi
# add comment with results
lintResultNew=$(grep "Lint Report.* [0-9]* warnings" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
lintResultNew=$(grep "Lint Report.* [0-9]* warning" build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
if ( [ -z $lintErrorNew ] ); then

View file

@ -1,5 +1,13 @@
#!/usr/bin/env bash
#1: LOG_USERNAME
#2: LOG_PASSWORD
#3: DRONE_BUILD_NUMBER
#4: TYPE (IT or Unit)
#5: DRONE_PULL_REQUEST
#6: GIT_USERNAME
#7: GIT_TOKEN
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
ID=$3
USER=$1
@ -16,4 +24,7 @@ find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$ID/$(echo {} | sed s#\./
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$ID/$(echo {} | sed s#\./##) --upload-file {} \;
echo "Uploaded failing tests to https://www.kaminsky.me/nc-dev/android-integrationTests/$ID"
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/$ID \" }"
exit 1