Browse Source

store lint output in nextcloud

tobiaskaminsky 8 years ago
parent
commit
6bc48fdb34
3 changed files with 20 additions and 1 deletions
  1. 1 1
      .drone.yml
  2. 0 0
      .drone.yml.sig
  3. 19 0
      scripts/lint/lint-up-wrapper.sh

+ 1 - 1
.drone.yml

@@ -34,7 +34,7 @@ pipeline:
         # needs gplay
         - sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle
         - export BRANCH=$(scripts/lint/getBranchName.sh ${GIT_USERNAME} ${GIT_TOKEN} ${DRONE_PULL_REQUEST})
-        - ruby scripts/lint/lint-up.rb ${GIT_USERNAME} ${GIT_TOKEN} $BRANCH
+        - scripts/lint/lint-up-wrapper.sh ${GIT_USERNAME} ${GIT_TOKEN} $BRANCH ${LOG_USERNAME} ${LOG_PASSWORD} ${DRONE_BUILD_NUMBER}
       when:
         matrix:
           FLAVOUR: Modified

File diff suppressed because it is too large
+ 0 - 0
.drone.yml.sig


+ 19 - 0
scripts/lint/lint-up-wrapper.sh

@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#1: GIT_USERNAME
+#2: GIT_TOKEN
+#3: BRANCH
+#4: LOG_USERNAME
+#5: LOG_PASSWORD
+#6: DRONE_BUILD_NUMBER
+
+cd `dirname $0`
+ruby ./lint-up.rb $1 $2 $3
+
+if [ $? -eq 0 ]; then
+    echo "New master at: https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v"
+    curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/master.html --upload-file ../../build/reports/lint/lint.html
+else
+    echo "New results at https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v ->" $6.html
+    curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/$6.html --upload-file ../../build/reports/lint/lint.html
+fi

Some files were not shown because too many files changed in this diff