new podman-based pipeline

pull/112/head
Alya Sirko 2022-09-09 18:40:11 +03:00
parent cbc31174f8
commit ee79942198
2 changed files with 5 additions and 4 deletions

View File

@ -22,10 +22,11 @@ steps:
- name: Prepare - name: Prepare
commands: commands:
- ln -s /var/lib/drone-runner-exec/.local $HOME/.local - ln -s /var/lib/drone-runner-exec/.local $HOME/.local
- podman unshare chown -R 999:999 .
- name: Build Intermediate Linux Release Artifact (Binary) - name: Build Intermediate Linux Release Artifact (Binary)
commands: commands:
- podman unshare ./ci.sh --build-linux - ./ci.sh --build-linux
environment: environment:
STANDALONE_KEYSTORE_PASS: STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS from_secret: STANDALONE_KEYSTORE_PASS
@ -34,7 +35,7 @@ steps:
- name: Build Intermediate Android Release Artifact (.APK) - name: Build Intermediate Android Release Artifact (.APK)
commands: commands:
- podman unshare ./ci.sh --build-apk - ./ci.sh --build-apk
environment: environment:
STANDALONE_KEYSTORE_PASS: STANDALONE_KEYSTORE_PASS:
from_secret: STANDALONE_KEYSTORE_PASS from_secret: STANDALONE_KEYSTORE_PASS

4
ci.sh
View File

@ -10,11 +10,11 @@ usage () {
} }
podman_offline () { podman_offline () {
podman run --rm -v "`pwd`:/var/lib/builder/src:U" -v "/var/lib/drone-runner-exec/fdroid:/var/lib/builder/repo:U" -v "/var/lib/drone-runner-exec/fdroid-keystore:/var/lib/builder/repo/fdroid-keystore:U" -v "/var/lib/drone-runner-exec/standalone-keystore:/var/lib/builder/repo/standalone-keystore:U" --env FDROID_KEYSTORE_PASS="$FDROID_KEYSTORE_PASS" --env STANDALONE_KEYSTORE_PASS="$STANDALONE_KEYSTORE_PASS" --network=none --workdir $1 "$CONTAINER_IMAGE" $2 podman run --rm -v "`pwd`:/var/lib/builder/src" -v "/var/lib/drone-runner-exec/fdroid:/var/lib/builder/repo:U" -v "/var/lib/drone-runner-exec/fdroid-keystore:/var/lib/builder/repo/fdroid-keystore:U" -v "/var/lib/drone-runner-exec/standalone-keystore:/var/lib/builder/repo/standalone-keystore:U" --env FDROID_KEYSTORE_PASS="$FDROID_KEYSTORE_PASS" --env STANDALONE_KEYSTORE_PASS="$STANDALONE_KEYSTORE_PASS" --network=none --workdir $1 "$CONTAINER_IMAGE" $2
} }
podman_online () { podman_online () {
podman run --rm -v "`pwd`:/var/lib/builder/src:U" --privileged --workdir $1 "$CONTAINER_IMAGE" $2 podman run --rm -v "`pwd`:/var/lib/builder/src" --privileged --workdir $1 "$CONTAINER_IMAGE" $2
} }
build_linux () { build_linux () {