selfprivacy.org.app/.drone.yml

206 lines
5.5 KiB
YAML
Raw Normal View History

2022-09-16 00:11:06 +00:00
kind: pipeline
type: exec
2022-09-17 06:49:05 +00:00
name: Nightly
2022-09-16 00:11:06 +00:00
steps:
- name: Prepare
commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-21 23:19:45 +00:00
- ln -s /var/lib/drone-runner-exec/fdroid $HOME/fdroid
2022-09-16 00:11:06 +00:00
- name: Run Tests
commands:
- ./ci.py --ci-run-tests
# - sonar-scanner -Dsonar.projectKey=SelfPrivacy-Flutter-App -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN"
2022-09-16 00:11:06 +00:00
environment:
SONARQUBE_TOKEN:
from_secret: SONARQUBE_TOKEN
2022-09-17 05:59:25 +00:00
- name: Build Nightly Linux Release Artifact (Binary)
2022-09-16 00:11:06 +00:00
commands:
- ./ci.py --ci-build-linux
2022-09-17 05:59:25 +00:00
- name: Build Nightly Release Artifact (.APK)
2022-09-16 00:11:06 +00:00
commands:
- ./ci.py --ci-build-apk
2022-09-17 06:49:05 +00:00
- name: Sign and Commit Nightly Android Release Artifact (.APK) for F-Droid Repository
2022-09-17 05:59:25 +00:00
commands:
2022-09-21 23:19:45 +00:00
- rm -rf $HOME/fdroid/build/org.selfprivacy.app.nightly && mkdir $HOME/fdroid/build/org.selfprivacy.app.nightly
- git archive --format=tar HEAD | tar x -C $HOME/fdroid/build/org.selfprivacy.app.nightly
2022-09-17 05:59:25 +00:00
- ./ci.py --sign-apk-fdroid-nightly
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-09-21 23:19:45 +00:00
- name: Deploy F-Droid Repository
2022-09-17 06:49:05 +00:00
commands:
- ./ci.py --deploy-fdroid-repo
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
2022-09-16 00:11:06 +00:00
trigger:
event:
- push
2022-09-22 02:15:00 +00:00
branch:
- master
2022-09-16 00:11:06 +00:00
node:
server: builder
---
kind: pipeline
type: exec
name: Release
steps:
- name: Prepare
commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-22 00:24:54 +00:00
- ln -s /var/lib/drone-runner-exec/fdroid $HOME/fdroid
2022-09-14 13:21:46 +00:00
- if podman volume exists release; then podman volume rm -f release; podman volume create release; else podman volume create release; fi
- git config user.email "builder@selfprivacy.org"
- git config user.name "Builder"
2022-09-20 04:33:30 +00:00
- name: Create an Empty Gitea Release
2022-09-20 03:49:59 +00:00
commands:
- ./ci.py --gitea-create-release
2022-09-20 04:11:27 +00:00
environment:
GITEA_RELEASE_TOKEN:
from_secret: GITEA_RELEASE_TOKEN
2022-09-20 03:49:59 +00:00
2022-09-15 02:39:40 +00:00
- name: Build Intermediate Linux Release Artifact (Binary)
commands:
- ./ci.py --build-linux
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
- name: Build Intermediate Android Release Artifact (.APK)
commands:
- ./ci.py --build-apk
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-09-15 01:21:33 +00:00
2022-12-31 07:56:47 +00:00
- name: Build Intermediate Android Release Artifact (Bundle)
commands:
- ./ci.py --build-bundle
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-09-15 01:21:33 +00:00
2022-09-15 02:39:40 +00:00
- name: Sign Android Release Artifact (.APK) for Standalone Use
commands:
- ./ci.py --sign-apk-standalone
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-09-17 06:49:05 +00:00
- name: Sign and Commit Android Release Artifact (.APK) for F-Droid Repository
2022-09-15 02:39:40 +00:00
commands:
2022-09-21 23:37:29 +00:00
- rm -rf $HOME/fdroid/build/org.selfprivacy.app && mkdir $HOME/fdroid/build/org.selfprivacy.app
- git archive --format=tar HEAD | tar x -C $HOME/fdroid/build/org.selfprivacy.app
2022-09-15 02:39:40 +00:00
- ./ci.py --sign-apk-fdroid
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-12-31 07:56:47 +00:00
- name: Sign Android Release Artifact (Bundle) for Google Play
commands:
- ./ci.py --sign-bundle
environment:
STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS
FDROID_KEYSTORE_PASS:
from_secret: FDROID_KEYSTORE_PASS
GOOGLE_KEYSTORE_PASS:
from_secret: GOOGLE_KEYSTORE_PASS
2022-09-15 16:46:44 +00:00
2022-09-15 02:39:40 +00:00
- name: Package Linux AppImage Artifact
commands:
- ./ci.py --package-linux-appimage
- name: Package Linux Flatpak Artifact
commands:
- ./ci.py --package-linux-flatpak
- name: Package Linux Archive Artifact
commands:
- ./ci.py --package-linux-archive
- name: Push Artifacts to the Release Volume
commands:
2023-01-17 01:20:54 +00:00
- git add -v *.AppImage *.AppImage.zsync *.flatpak *.apk *.apk.idsig *.aab *.tar.zstd
2022-09-15 02:39:40 +00:00
- git commit -m Release
- git archive --format=tar HEAD | podman volume import release -
2022-09-14 13:21:46 +00:00
trigger:
event:
- tag
node:
server: builder
---
kind: pipeline
type: exec
name: Deploy
steps:
- name: Prepare
commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local
2022-09-14 13:21:46 +00:00
- podman unshare podman volume mount release
2022-09-22 00:24:54 +00:00
- name: Deploy Artifacts to Gitea
commands:
2022-09-14 13:21:46 +00:00
- ./ci.py --deploy-gitea-release
environment:
GITEA_RELEASE_TOKEN:
from_secret: GITEA_RELEASE_TOKEN
2022-09-17 07:10:19 +00:00
- name: Deploy F-Droid Repository
commands:
2022-09-14 13:21:46 +00:00
- ./ci.py --deploy-fdroid-repo
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
trigger:
event:
- tag
node:
server: builder
depends_on:
- Release