BartRunnerAndroid/.drone.yml

47 lines
2.0 KiB
YAML
Raw Permalink Normal View History

2017-08-11 16:39:57 +00:00
workspace:
base: /src
path: .
pipeline:
build:
image: openjdk:8-jdk
environment:
- ANDROID_COMPILE_SDK=25
- ANDROID_BUILD_TOOLS=25.0.2
- ANDROID_SDK_TOOLS=3859397
commands:
- 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=sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip https://dl.google.com/android/repository/sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip || true
- unzip -d $${ANDROID_HOME}/ sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip
- mkdir -p $${ANDROID_HOME}/licenses/
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $${ANDROID_HOME}/licenses/android-sdk-license
- mkdir -p $${HOME}/.android
- touch $${HOME}/.android/repositories.cfg
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager --update
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-$${ANDROID_COMPILE_SDK}"
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;$${ANDROID_BUILD_TOOLS}"
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;android;m2repository"
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;m2repository"
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;google_play_services"
- ./gradlew build
rename:
image: busybox
commands:
- mv app/build/outputs/apk/app-debug.apk app/build/outputs/apk/bartrunner-debug.apk
upload_debug:
image: vividboarder/drone-webdav
file: app/build/outputs/apk/bartrunner-debug.apk
destination: https://cloud.iamthefij.com/remote.php/dav/files/iamthefij/Android/Apks/
secrets:
- source: WEBDAV_USER
target: PLUGIN_USERNAME
- source: WEBDAV_PASSWORD
target: PLUGIN_PASSWORD