From b65dcaf9238f95b123b78ff6fad2d91cdcba3c14 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 Mar 2024 09:56:07 +0100 Subject: [PATCH 1/2] Test on stable28 Signed-off-by: tobiasKaminsky --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b93b660a8..59f4fabc7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -180,7 +180,7 @@ services: - name: server-stable image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest environment: - SERVER_VERSION: stable27 + SERVER_VERSION: stable28 commands: - apt-get update && apt-get install -y composer - mkdir /var/www/.nvm /var/www/.npm; touch /var/www/.bashrc; chown -R 33:33 /var/www/.nvm /var/www/.npm /var/www/.bashrc From 51e1a0f1991e62cacc60b21bf6b7f3b40b3a8b47 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 Mar 2024 11:27:29 +0100 Subject: [PATCH 2/2] correct url Signed-off-by: tobiasKaminsky --- .drone.yml | 4 +++- scripts/uploadReport.sh | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 59f4fabc7..539b099ac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 @@ -232,6 +234,6 @@ trigger: - pull_request --- kind: signature -hmac: 05ce597eecb009f9783123cd1e1e507ceed79671fcb5544cd8d4eaafb6df49c1 +hmac: 1db4c5952e15c8f0a55ab96243f42c80968f566926d40c2a94747489aef11331 ... diff --git a/scripts/uploadReport.sh b/scripts/uploadReport.sh index 52b440626..f706f31fe 100755 --- a/scripts/uploadReport.sh +++ b/scripts/uploadReport.sh @@ -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 @@ -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