Add drone config

This commit is contained in:
ian@iamthefij.com 2017-05-26 22:49:18 -07:00
parent 0cedb96894
commit c709d44fac

40
.drone.yml Normal file
View File

@ -0,0 +1,40 @@
workspace:
base: /src
path: .
pipeline:
build:
image: openjdk:8-jdk
environment:
- ANDROID_COMPILE_SDK=23
- ANDROID_BUILD_TOOLS=23.0.1
- ANDROID_SDK_TOOLS=24
commands:
- pwd
- chmod +x ./gradlew
- export ANDROID_HOME=/src/android-sdk-linux
- export PATH=$${PATH}:$${ANDROID_HOME}/platform-tools/
- export GRADLE_USER_HOME=/src/.gradle
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --no-clobber --quiet --output-document=android-sdk-$${ANDROID_SDK_TOOLS}.tgz https://dl.google.com/android/android-sdk_r$${ANDROID_SDK_TOOLS}-linux.tgz || true
- tar --extract --gzip --file=android-sdk-$${ANDROID_SDK_TOOLS}.tgz
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-$${ANDROID_COMPILE_SDK}
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-$${ANDROID_BUILD_TOOLS}
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository
- mkdir -p $${ANDROID_HOME}/licenses/
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $${ANDROID_HOME}/licenses/android-sdk-license
- ./gradlew assembleDebug
upload:
image: vividboarder/drone-webdav
file: org.fox.ttrss/build/outputs/apk/org.fox.ttrss-debug.apk
destination: https://cloud.iamthefij.com/remote.php/dav/files/iamthefij/Android/Apks/
secrets:
- source: nextclouduser
target: PLUGIN_USERNAME
- source: nextcloudpassword
target: PLUGIN_PASSWORD