Browse Source

use branch, user, pass

tobiaskaminsky 7 years ago
parent
commit
82784a8a54
3 changed files with 32 additions and 33 deletions
  1. 28 28
      .drone.yml
  2. 0 0
      .drone.yml.sig
  3. 4 5
      scripts/lint/lint-up.rb

+ 28 - 28
.drone.yml

@@ -1,32 +1,32 @@
 pipeline:
-  test:
-    image: nextcloudci/android:android-18
-    commands:
-      # uncomment gplay for Gplay, Modified only
-      - sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle; fi"
-
-      - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
-      - emulator -avd test -no-window &
-      - ./wait_for_emulator.sh
-
-      # build app and assemble APK, in debug mode
-      - ./gradlew assemble${FLAVOUR}
-
-      # run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
-      # - ./gradlew connectedDebugAndroidTest --info
-
-      # install app, then assemble and install instrumented tests of app module
-      - ./gradlew :install${FLAVOUR}Debug
-      - ./gradlew :install${FLAVOUR}DebugAndroidTest
-
-      # run sample instrumented unit test
-      # TODO fails because test runner is not available
-      #- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
-
-    environment:
-      - ANDROID_TARGET=android-24
-      - ANDROID_ABI=armeabi-v7a
-      - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
+#  test:
+#    image: nextcloudci/android:android-18
+#    commands:
+#      # uncomment gplay for Gplay, Modified only
+#      - sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle; fi"
+#
+#      - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
+#      - emulator -avd test -no-window &
+#      - ./wait_for_emulator.sh
+#
+#      # build app and assemble APK, in debug mode
+#      - ./gradlew assemble${FLAVOUR}
+#
+#      # run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
+#      # - ./gradlew connectedDebugAndroidTest --info
+#
+#      # install app, then assemble and install instrumented tests of app module
+#      - ./gradlew :install${FLAVOUR}Debug
+#      - ./gradlew :install${FLAVOUR}DebugAndroidTest
+#
+#      # run sample instrumented unit test
+#      # TODO fails because test runner is not available
+#      #- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
+#
+#    environment:
+#      - ANDROID_TARGET=android-24
+#      - ANDROID_ABI=armeabi-v7a
+#      - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
 
   lint:
       image: nextcloudci/android:android-18

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


+ 4 - 5
scripts/lint/lint-up.rb

@@ -2,6 +2,8 @@
 # adapts to drone, use git username / token as parameter
 
 puts "=================== starting Android Lint Entropy Reducer ===================="
+
+# get args
 git_user, git_token, git_branch = ARGV
 
 # ========================  SETUP ============================
@@ -148,9 +150,6 @@ end
 # write new results to file (will overwrite existing, or create new)
 File.write(previous_lint_report, "DO NOT TOUCH; GENERATED BY TRAVIS\n" + error_warning_string)
 
-# get user, token from arguments
-git_user, git_token = ARGV
-
 # push changes to github (if this script is run locally, we don't want to overwrite git username and email, so save temporarily)
 previous_git_username, st = Open3.capture2('git config user.name')
 previous_git_username = previous_git_username.strip
@@ -170,11 +169,11 @@ system ('git add ' + PREVIOUS_LINT_RESULTS_FILE)
 # Travis has git in a detached head here. Let's get on the right branch.
 travis_branch_name = ENV['TRAVIS_BRANCH']
 if travis_branch_name != nil
-    system ('git checkout ' + travis_branch_name)
+    system ('git checkout ' + git_branch)
 end
 
 # commit changes; Add "skip ci" so that we don't accidentally trigger another Travis build
-system ('git commit -m "Travis: update Lint results to reflect reduced error/warning count [skip ci]" ')
+system ('git commit -m "Drone: update Lint results to reflect reduced error/warning count [skip ci]" ')
 
 # push to origin
 system("git config push.default simple")

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