Skip to content

Commit

Permalink
correct url
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky committed Mar 28, 2024
1 parent b65dcaf commit 51e1a0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ steps:
- ./scripts/wait_for_server.sh server-stable
- scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- adb logcat -c
- adb logcat > logcat.txt &
- ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
- ./gradlew installDebugAndroidTest
- ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
Expand Down Expand Up @@ -232,6 +234,6 @@ trigger:
- pull_request
---
kind: signature
hmac: 05ce597eecb009f9783123cd1e1e507ceed79671fcb5544cd8d4eaafb6df49c1
hmac: 1db4c5952e15c8f0a55ab96243f42c80968f566926d40c2a94747489aef11331

...
10 changes: 5 additions & 5 deletions scripts/uploadReport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ GIT_USERNAME=$7
GIT_TOKEN=$8
REMOTE_FOLDER=$ID-$TYPE-$BRANCH-$(date +%H-%M)
BRANCH_TYPE=$BRANCH-$TYPE
URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/library-integrationTests
URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-library-integrationTests

# upload logcat
log_filename=$ID"_logcat.txt.xz"
log_file="${log_filename}"
upload_path="https://nextcloud.kaminsky.me/remote.php/webdav/library-logcat/$log_filename"
upload_path="https://nextcloud.kaminsky.me/remote.php/webdav/android-library-logcat/$log_filename"
xz logcat.txt
mv logcat.txt.xz "$log_file"
curl -u "$USER:$PASS" -X PUT "$upload_path" --upload-file "$log_file"
echo >&2 "Uploaded logcat to https://www.kaminsky.me/nc-dev/library-logcat/$log_filename"
echo >&2 "Uploaded logcat to https://www.kaminsky.me/nc-dev/android-library-logcat/$log_filename"

if [ $TYPE = "IT" ]; then
cd library/build/reports/androidTests/connected
Expand All @@ -39,7 +39,7 @@ fi
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 library tests to https://www.kaminsky.me/nc-dev/library-integrationTests/$REMOTE_FOLDER"
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER"
curl -u $GIT_USERNAME:$GIT_TOKEN -X POST https://api.github.com/repos/nextcloud/android-library/issues/$PR_ID/comments -d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/library-integrationTests/$REMOTE_FOLDER/debug/ \" }"
curl -u $GIT_USERNAME:$GIT_TOKEN -X POST https://api.github.com/repos/nextcloud/android-library/issues/$PR_ID/comments -d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER/debug/ \" }"
exit 1

0 comments on commit 51e1a0f

Please sign in to comment.