88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
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:
|
|
- device: mondrianlte
|
|
version: 20.0
|
|
|
|
pipeline:
|
|
sync:
|
|
pull: true
|
|
image: docker.nyyu.dev/lineage/android
|
|
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
|
|
image: docker.nyyu.dev/lineage/android
|
|
environment:
|
|
- BUILD_HOSTNAME=docker
|
|
commands:
|
|
- cd /build
|
|
- bash -c ". build/envsetup.sh && lunch lineage_$device-eng && mka bacon -j6"
|
|
volumes:
|
|
- *build_vol
|
|
- *tools_vol
|
|
when:
|
|
event:
|
|
- manual
|
|
- cron
|
|
copy:
|
|
pull: true
|
|
image: alpine
|
|
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
|
|
image: alpine
|
|
commands:
|
|
- rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip
|
|
- rm -f /build/changelog-$device-$version.md
|
|
volumes:
|
|
- *build_vol
|
|
when:
|
|
event:
|
|
- manual
|
|
- cron
|
|
publish:
|
|
pull: true
|
|
image: alpine
|
|
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
|