summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-04-02 10:18:25 +0300
committerAndrew Dolgov <[email protected]>2023-04-02 10:19:09 +0300
commit484951cfe677172d709ed417f8d3c11082679cf1 (patch)
treec95f4be9b4dbc53c7b03a91d2e6af55feef84c4c
parent112edbb3047df0d417c8b32de5aad0acec91699b (diff)
use ci template
-rw-r--r--.gitlab-ci.yml50
1 files changed, 4 insertions, 46 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81f7e18..694c88c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,46 +1,4 @@
-variables:
- ANDROID_HOME: /toolcache/android-sdk
-
-stages:
- - build
- - deploy
-
-build-apk:
- image: ${CI_ANDROID_IMAGE}
- stage: build
- rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- before_script:
- - >
- [ -d $ANDROID_HOME ] || exit 1
- script:
- - base64 -d < ${FDROID_KEYSTORE} > /fdroid.jks
- - bash ./gradlew --no-daemon assembleFdroid
- -PFDROID_STORE_FILE=/fdroid.jks
- -PFDROID_STORE_PASSWORD=${FDROID_STORE_PASSWORD}
- -PFDROID_KEY_ALIAS=fdroid
- -PFDROID_KEY_PASSWORD=${FDROID_KEY_PASSWORD}
- artifacts:
- paths:
- - ${CI_PROJECT_DIR}/**/*.apk
-
-deploy-apk:
- image: ${CI_DOCKER_IMAGE}
- stage: deploy
- needs:
- - build-apk
- rules:
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- when: manual
- script:
- - |
- mkdir -p ~/.ssh
- cp ${APK_DEPLOY_SSH_KEY} ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- - |
- find . -name '*.apk' -type f | while read APK; do
- scp -oStrictHostKeyChecking=no $APK ${APK_DEPLOY_HOST}:fdroid/repo/
- done
-
- ssh -oStrictHostKeyChecking=no ${APK_DEPLOY_HOST} \
- sudo -u docker-mgr /usr/local/sbin/fdroid-update-repo
+include:
+ - project: 'git/ci-templates'
+ ref: master
+ file: .ci-build-apk-fdroid.yml