diff --git a/.drone.yml b/.drone.yml index 7f6fe3adee9b..8273551e5265 100644 --- a/.drone.yml +++ b/.drone.yml @@ -69,7 +69,7 @@ steps: - ./gradlew combinedTestReport - curl -o codecov.sh https://codecov.io/bash - bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5 - + - scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - name: notify image: drillster/drone-email host: $EMAIL_HOST @@ -160,3 +160,33 @@ trigger: event: - push - pull_request +--- +kind: pipeline +name: qa + +steps: + - name: qa + image: nextcloudci/android:android-44 + privileged: true + environment: + LOG_USERNAME: + from_secret: LOG_USERNAME + LOG_PASSWORD: + from_secret: LOG_PASSWORD + GIT_USERNAME: + from_secret: GIT_USERNAME + GIT_TOKEN: + from_secret: GIT_TOKEN + KS_PASS: + from_secret: KS_PASS + KEY_PASS: + from_secret: KEY_PASS + commands: + - sed -i "/qa/,/\}/ s/versionCode .*/versionCode $DRONE_BUILD_NUMBER/" build.gradle + - sed -i "/qa/,/\}/ s/versionName .*/versionName \"$DRONE_BUILD_NUMBER\"/" build.gradle + - ./gradlew assembleQaDebug + - /opt/android-sdk-linux/build-tools/*/apksigner sign --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias key0 --ks scripts/QA_keystore.jks build/outputs/apk/qa/debug/qa-debug-*.apk + - scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN +trigger: + event: + - pull_request diff --git a/build.gradle b/build.gradle index e47d2037375d..6dd0d7d83a87 100644 --- a/build.gradle +++ b/build.gradle @@ -147,6 +147,13 @@ android { versionCode 20190515 versionName "20190515" } + + qa { + applicationId "com.nextcloud.android.qa" + dimension "default" + versionCode 1 + versionName "1" + } } } @@ -254,6 +261,7 @@ dependencies { genericImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' gplayImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' versionDevImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' + qaImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.google.android.material:material:1.0.0' diff --git a/drawable_resources/logo_qa.svg b/drawable_resources/logo_qa.svg new file mode 100644 index 000000000000..0376c0b303c0 --- /dev/null +++ b/drawable_resources/logo_qa.svg @@ -0,0 +1,35 @@ + + diff --git a/scripts/QA_keystore.jks b/scripts/QA_keystore.jks new file mode 100644 index 000000000000..2b8fb9bc2312 Binary files /dev/null and b/scripts/QA_keystore.jks differ diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 601928674f37..427a92d477f7 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -46,8 +46,8 @@ else echo "New findbugs results at https://www.kaminsky.me/nc-dev/$repository-findbugs/$6.html" curl 2>/dev/null -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$6.html --upload-file build/reports/spotbugs/spotbugs.html - # delete all old comments - oldComments=$(curl 2>/dev/null -u $1:$2 -X GET https://api.github.com/repos/nextcloud/android/issues/$7/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) ' | grep true | tr -d "\"" | cut -f1 -d"|") + # delete all old comments, starting with Codacy + oldComments=$(curl 2>/dev/null -u $1:$2 -X GET https://api.github.com/repos/nextcloud/android/issues/$7/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("nextcloud-android-bot") | tostring) + "|" + (.body | test("
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General + * Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any + * later version. + *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + *
+ * You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General + * Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any + * later version. + *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + *
+ * You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+ *