build/.woodpecker.yml

90 lines
2.6 KiB
YAML
Raw Normal View History

2022-12-08 22:34:08 +01:00
variables:
- &build_vol '/media/fast/lineage/lineage-20.0:/build'
- &tools_vol '/media/fast/lineage/tools:/tools'
- &http_vol '/srv/http/drone:/http'
- &pub_vol '/mnt/android/lineage:/publish'
matrix:
include:
2022-12-30 18:40:12 +01:00
- device: mondrianlte
2022-12-08 22:34:08 +01:00
version: 20.0
pipeline:
sync:
pull: true
2022-12-10 12:39:55 +01:00
image: docker.nyyu.dev/lineage/android
2022-12-08 22:34:08 +01:00
commands:
- HOME=/home/drone
- git config --global user.email 'drone@nyyu.dev'
- git config --global user.name 'drone'
- cd /build
- rm -rf .repo/repo
- repo init -u https://github.com/LineageOS-UL/android.git -b lineage-$version
- mkdir -p .repo/local_manifests
- cp $CI_WORKSPACE/$device.xml .repo/local_manifests/roomservice.xml
- bash $CI_WORKSPACE/sync.sh
volumes:
- *build_vol
when:
event:
- manual
- cron
build:
pull: true
2022-12-10 12:39:55 +01:00
image: docker.nyyu.dev/lineage/android
environment:
- BUILD_HOSTNAME=docker
2022-12-08 22:34:08 +01:00
commands:
- cd /build
2022-12-31 16:53:19 +01:00
- bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6"
2022-12-08 22:34:08 +01:00
volumes:
- *build_vol
- *tools_vol
when:
event:
- manual
- cron
copy:
pull: true
2022-12-10 12:39:55 +01:00
image: alpine
2022-12-08 22:34:08 +01:00
commands:
- rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip*
- mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/
- cat /build/changelog-$device-$version.md >> /http/changelog-$device-$version.md
- ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip*
volumes:
- *build_vol
- *http_vol
when:
event:
- manual
- cron
clean:
pull: true
2022-12-10 12:39:55 +01:00
image: alpine
2022-12-08 22:34:08 +01:00
commands:
- rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip
2022-12-31 17:37:15 +01:00
- rm -rf /build/out/target/product/$device/obj/PACKAGING/target_files_intermediates/*
2023-01-05 23:38:15 +01:00
- find /build/out/target/product/$device -type f -name '*.prop' -exec rm -vf {} +
2022-12-08 22:34:08 +01:00
- rm -f /build/changelog-$device-$version.md
volumes:
- *build_vol
when:
event:
- manual
- cron
publish:
pull: true
2022-12-10 12:39:55 +01:00
image: alpine
2022-12-08 22:34:08 +01:00
commands:
- mv /http/lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/
- cat /http/changelog-$device-$version.md >> /publish/$version/$device/changelog.md
- rm -f /http/changelog-$device-$version.md
- ls -lh /publish/$version/$device/
volumes:
- *http_vol
- *pub_vol
when:
event:
- deployment