feat: woodpecker ci
This commit is contained in:
parent
7e3c0d7829
commit
5ea8d2927c
2 changed files with 96 additions and 8 deletions
85
.woodpecker.yml
Normal file
85
.woodpecker.yml
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
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: mondrianwifi
|
||||||
|
version: 20.0
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
sync:
|
||||||
|
pull: true
|
||||||
|
image: docker.nyyu.dev/lineage/android:latest
|
||||||
|
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:latest
|
||||||
|
commands:
|
||||||
|
- cd /build
|
||||||
|
- bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6"
|
||||||
|
volumes:
|
||||||
|
- *build_vol
|
||||||
|
- *tools_vol
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- manual
|
||||||
|
- cron
|
||||||
|
copy:
|
||||||
|
pull: true
|
||||||
|
image: docker.nyyu.dev/lineage/android:latest
|
||||||
|
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: docker.nyyu.dev/lineage/android:latest
|
||||||
|
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: docker.nyyu.dev/lineage/android:latest
|
||||||
|
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
|
19
sync.sh
19
sync.sh
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# shellcheck disable=SC2250,SC2154,SC2086,SC1091,SC2312
|
# shellcheck disable=SC2250,SC2154,SC2086,SC1091,SC2312
|
||||||
|
|
||||||
|
if [[ -z "$CI_WORKSPACE" ]]; then
|
||||||
|
CI_WORKSPACE=$DRONE_WORKSPACE_BASE
|
||||||
|
fi
|
||||||
|
|
||||||
TOPDIR=$(pwd)
|
TOPDIR=$(pwd)
|
||||||
changelog=${TOPDIR}/changelog-${device}-${version}.md
|
changelog=${TOPDIR}/changelog-${device}-${version}.md
|
||||||
|
@ -38,28 +41,28 @@ cat "${changelog}"
|
||||||
. build/envsetup.sh
|
. build/envsetup.sh
|
||||||
|
|
||||||
cd packages/apps/LineageParts
|
cd packages/apps/LineageParts
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-always-enable-taskbar-toggle.patch || git am --abort
|
git am $CI_WORKSPACE/fix-always-enable-taskbar-toggle.patch || git am --abort
|
||||||
cd $TOPDIR
|
cd $TOPDIR
|
||||||
cd packages/apps/Trebuchet
|
cd packages/apps/Trebuchet
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-enable-more-grids-for-tablet.patch || git am --abort
|
git am $CI_WORKSPACE/fix-enable-more-grids-for-tablet.patch || git am --abort
|
||||||
cd $TOPDIR
|
cd $TOPDIR
|
||||||
|
|
||||||
#bluetooth
|
#bluetooth
|
||||||
cd packages/modules/Bluetooth
|
cd packages/modules/Bluetooth
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-bt-1.patch || git am --abort
|
git am $CI_WORKSPACE/fix-bt-1.patch || git am --abort
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-bt-2.patch || git am --abort
|
git am $CI_WORKSPACE/fix-bt-2.patch || git am --abort
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-bt-3.patch || git am --abort
|
git am $CI_WORKSPACE/fix-bt-3.patch || git am --abort
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-bt-le.patch || git am --abort
|
git am $CI_WORKSPACE/fix-bt-le.patch || git am --abort
|
||||||
cd $TOPDIR
|
cd $TOPDIR
|
||||||
|
|
||||||
#connectivity
|
#connectivity
|
||||||
cd packages/modules/Connectivity
|
cd packages/modules/Connectivity
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-NetworkStats-disable-BPF.patch || git am --abort
|
git am $CI_WORKSPACE/fix-NetworkStats-disable-BPF.patch || git am --abort
|
||||||
cd $TOPDIR
|
cd $TOPDIR
|
||||||
|
|
||||||
#av
|
#av
|
||||||
cd frameworks/av
|
cd frameworks/av
|
||||||
git am $DRONE_WORKSPACE_BASE/fix-rear-camera-rotation.patch || git am --abort
|
git am $CI_WORKSPACE/fix-rear-camera-rotation.patch || git am --abort
|
||||||
cd $TOPDIR
|
cd $TOPDIR
|
||||||
|
|
||||||
#safetynet
|
#safetynet
|
||||||
|
|
Loading…
Add table
Reference in a new issue