1
0
mirror of https://codeberg.org/gitnex/GitNex synced 2024-12-23 17:15:49 +01:00
GitNex-Android-App/.drone.yml
opyale 01bd61ad8e Fixing CI (#710)
Fixing CI.

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/710
Reviewed-by: 6543 <6543@noreply.codeberg.org>
2020-09-26 20:21:29 +02:00

105 lines
2.2 KiB
YAML

---
kind: pipeline
type: docker
name: tests
steps:
- name: unit-tests
image: nextcloudci/android:android-49
depends_on: [ clone ]
commands:
- ./gradlew test
- name: check-formatting
image: zosiab/eclint:latest
depends_on: [ clone ]
commands:
- git pull origin master
- eclint check $(git diff --name-only origin/master)
# This may be used in the future, because it makes of intellij's native code inspection/formatting capabilities.
# Additional information: https://www.jetbrains.com/help/idea/command-line-formatter.html
#
# - name: do-or-check-formatting
# image: dlsniper/docker-intellij
# depends_on: [ clone ]
# commands:
# - /opt/intellij/bin/idea.sh inspect/format ...
#
# - name: do-or-check-formatting
# image: dlsniper/docker-intellij
# depends_on: [ clone ]
# commands:
# - /opt/intellij/bin/idea.sh format -s .idea/codeStyles/Project.xml -m *.java app/src/main/java
trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: code-analysis
steps:
- name: check-global-formatting
image: zosiab/eclint:latest
depends_on: [ clone ]
commands:
- eclint check $(git ls-files)
trigger:
event:
- push
branch:
- master
---
kind: pipeline
type: docker
name: build
steps:
- name: build
image: nextcloudci/android:android-49
commands:
- ./gradlew assembleFreeRelease
- name: sign
image: nextcloudci/android:android-49
environment:
BOT_TOKEN:
from_secret: BOT_TOKEN
KS_PASS:
from_secret: KS_PASS
KEY_PASS:
from_secret: KEY_PASS
OUTPUT: signed.apk
INSTANCE: https://codeberg.org
KS_FILE: ci_keystore.jks
KS_REPO:
from_secret: KS_REPO
commands:
- ./scripts/sign-build.sh
- name: publish
image: vividboarder/drone-webdav
environment:
WEBDAV_USERNAME: GitNexBot
WEBDAV_PASSWORD:
from_secret: NC_TOKEN
PLUGIN_FILE: 'signed.apk'
PLUGIN_TIMEOUT: 180
PLUGIN_ATTEMPTS: 5
PLUGIN_DESTINATION: 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk'
PLUGIN_CUSTOM_ARGUMENTS: '--progress-bar'
trigger:
event:
- push
branch:
- master