diff --git a/.drone.yml b/.drone.yml index 1b3f190..f4f0420 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,69 +1,106 @@ ---- kind: pipeline -type: exec +type: docker name: mondrianwifi -platform: - os: linux - arch: amd64 +environment: + device: mondrianwifi + version: 18.1 steps: - name: sync + pull: always + image: docker.nyyu.dev/lineage/android:latest commands: - - source $DRONE_HOME/${DRONE_STAGE_NAME}.env - - cd $work + - cd /build + - rm -rf .repo/repo - repo init -u https://github.com/LineageOS/android.git -b lineage-$version - mkdir -p .repo/local_manifests - - cp $DRONE_HOME/$device.xml .repo/local_manifests/roomservice.xml + - cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml - repo sync -q -c -j 6 --fail-fast --force-sync --no-tags - + volumes: + - name: build + path: /build - name: build - shell: /bin/bash + pull: always + image: docker.nyyu.dev/lineage/android:latest commands: - - source $DRONE_HOME/${DRONE_STAGE_NAME}.env - - cd $work - - . build/envsetup.sh - - lunch lineage_$device-userdebug - - mka bacon -j6 - + - cd /build + - bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6" + volumes: + - name: build + path: /build - name: copy + pull: always + image: docker.nyyu.dev/lineage/android:latest commands: - - source $DRONE_HOME/${DRONE_STAGE_NAME}.env - - cd $work - - rm -f $httpdir/lineage-$version-*-UNOFFICIAL-$device.zip{,.sha256sum} - - mv -f out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip{,.sha256sum} $httpdir/ - - ls -lh $httpdir/lineage-$version-*-UNOFFICIAL-$device.zip{,.sha256sum} - + - rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip* + - mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/ + - ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip* + volumes: + - name: build + path: /build + - name: http + path: /http - name: clean + pull: always + image: docker.nyyu.dev/lineage/android:latest commands: - - source $DRONE_HOME/${DRONE_STAGE_NAME}.env - - cd $work + - cd /build - rm -f out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* out/target/product/$device/lineage_$device-ota-eng.*.zip - + volumes: + - name: build + path: /build trigger: event: - - push - custom - cron ---- +volumes: +- name: http + host: + path: /srv/http/drone +- name: build + host: + path: /drone/lineage-18.1 +- name: publish + host: + path: /mnt/android/lineage -kind: pipeline -type: exec +image_pull_secrets: +- dockerconfig +--- +kind: pipeline +type: docker name: mondrianwifi-publish -platform: - os: linux - arch: amd64 +environment: + device: mondrianwifi + version: 18.1 steps: - name: publish + pull: always + image: docker.nyyu.dev/lineage/android:latest commands: - - source $DRONE_HOME/mondrianwifi.env - - cd $httpdir - - mv lineage-$version-*-UNOFFICIAL-$device.zip{,.sha256sum} $publishdir/ - - ls -lh $publishdir/ - + - cd /http + - mv lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/ + - ls -lh /publish/$version/$device/ + volumes: + - name: http + path: /http + - name: publish + path: /publish trigger: event: - promote + +volumes: +- name: http + host: + path: /srv/http/drone +- name: publish + host: + path: /mnt/android/lineage + +image_pull_secrets: +- dockerconfig diff --git a/mondrianlte.env b/mondrianlte.env deleted file mode 100644 index 07afe48..0000000 --- a/mondrianlte.env +++ /dev/null @@ -1,5 +0,0 @@ -version=18.1 -work=/drone/lineage-$version -device=mondrianlte -httpdir=/srv/http/drone -publishdir=/mnt/android/lineage/$version/$device diff --git a/mondrianlte.xml b/mondrianlte.xml deleted file mode 100644 index 69e14db..0000000 --- a/mondrianlte.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mondrianwifi.env b/mondrianwifi.env deleted file mode 100644 index cc0db4d..0000000 --- a/mondrianwifi.env +++ /dev/null @@ -1,5 +0,0 @@ -version=18.1 -work=/drone/lineage-$version -device=mondrianwifi -httpdir=/srv/http/drone -publishdir=/mnt/android/lineage/$version/$device