2019-10-13 02:46:52 +02:00
|
|
|
---
|
2019-10-10 03:29:35 +02:00
|
|
|
kind: pipeline
|
2020-05-27 20:09:55 +02:00
|
|
|
type: docker
|
|
|
|
name: tests
|
2019-10-10 03:29:35 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-05-27 20:09:55 +02:00
|
|
|
- name: unit-tests
|
2019-10-10 03:29:35 +02:00
|
|
|
image: nextcloudci/android:android-49
|
2020-05-27 20:09:55 +02:00
|
|
|
depends_on: [ clone ]
|
2019-10-10 03:29:35 +02:00
|
|
|
commands:
|
|
|
|
- ./gradlew test
|
|
|
|
|
2020-05-27 20:09:55 +02:00
|
|
|
- name: check-formatting
|
2020-05-29 23:31:55 +02:00
|
|
|
image: zosiab/eclint:latest
|
2020-05-27 20:09:55 +02:00
|
|
|
depends_on: [ clone ]
|
|
|
|
commands:
|
2021-05-01 20:30:44 +02:00
|
|
|
- git pull origin main
|
|
|
|
- eclint check $(git diff --name-only origin/main)
|
2020-05-27 20:09:55 +02:00
|
|
|
|
|
|
|
# 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 ...
|
2020-07-09 08:55:05 +02:00
|
|
|
#
|
|
|
|
# - 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
|
2020-05-27 20:09:55 +02:00
|
|
|
|
2019-10-13 02:46:52 +02:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2020-05-27 20:09:55 +02:00
|
|
|
type: docker
|
|
|
|
name: code-analysis
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: check-global-formatting
|
2020-05-29 23:31:55 +02:00
|
|
|
image: zosiab/eclint:latest
|
2020-05-27 20:09:55 +02:00
|
|
|
depends_on: [ clone ]
|
|
|
|
commands:
|
|
|
|
- eclint check $(git ls-files)
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
branch:
|
2021-05-01 20:30:44 +02:00
|
|
|
- main
|
2020-05-27 20:09:55 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build
|
2019-10-13 02:46:52 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2019-10-10 03:29:35 +02:00
|
|
|
- name: build
|
|
|
|
image: nextcloudci/android:android-49
|
|
|
|
commands:
|
2020-09-26 20:21:29 +02:00
|
|
|
- ./gradlew assembleFreeRelease
|
2019-10-10 03:29:35 +02:00
|
|
|
|
2020-04-15 18:09:29 +02:00
|
|
|
- name: sign
|
|
|
|
image: nextcloudci/android:android-49
|
|
|
|
environment:
|
2020-07-09 08:55:05 +02:00
|
|
|
BOT_TOKEN:
|
2020-04-15 18:09:29 +02:00
|
|
|
from_secret: BOT_TOKEN
|
|
|
|
KS_PASS:
|
|
|
|
from_secret: KS_PASS
|
|
|
|
KEY_PASS:
|
|
|
|
from_secret: KEY_PASS
|
|
|
|
OUTPUT: signed.apk
|
2020-09-26 20:21:29 +02:00
|
|
|
INSTANCE: https://codeberg.org
|
2020-04-15 18:09:29 +02:00
|
|
|
KS_FILE: ci_keystore.jks
|
|
|
|
KS_REPO:
|
|
|
|
from_secret: KS_REPO
|
|
|
|
commands:
|
|
|
|
- ./scripts/sign-build.sh
|
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: vividboarder/drone-webdav
|
|
|
|
environment:
|
2020-05-28 12:19:14 +02:00
|
|
|
WEBDAV_USERNAME: GitNexBot
|
|
|
|
WEBDAV_PASSWORD:
|
2020-04-15 18:09:29 +02:00
|
|
|
from_secret: NC_TOKEN
|
2020-05-28 12:19:14 +02:00
|
|
|
PLUGIN_FILE: 'signed.apk'
|
|
|
|
PLUGIN_TIMEOUT: 180
|
|
|
|
PLUGIN_ATTEMPTS: 5
|
2020-07-09 15:18:21 +02:00
|
|
|
PLUGIN_DESTINATION: 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk'
|
2020-05-28 12:19:14 +02:00
|
|
|
PLUGIN_CUSTOM_ARGUMENTS: '--progress-bar'
|
2020-04-15 18:09:29 +02:00
|
|
|
|
2019-10-10 03:29:35 +02:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
2019-10-14 11:27:04 +02:00
|
|
|
branch:
|
2021-05-01 20:30:44 +02:00
|
|
|
- main
|