Skip to content
Snippets Groups Projects
Commit bd44454c authored by ab0027's avatar ab0027 💬
Browse files

Configure CI scripts to build image with CI

parent 044b97f3
No related branches found
No related tags found
No related merge requests found
Pipeline #7292 failed
...@@ -13,7 +13,33 @@ build-zynthbox-image-armhf: ...@@ -13,7 +13,33 @@ build-zynthbox-image-armhf:
- ./build/*.img.xz - ./build/*.img.xz
expire_in: 1 day expire_in: 1 day
script: script:
- echo "" - image_name="zynthbox_rpi4_buster_$(date "+%F_%H%M").img"
- log_file_name="$image_name.build.log"
# Update and install dependencies
- apt-get update
- apt-get install -y coreutils p7zip-full qemu-user-static sudo git wget python3 lsof
# Clone repositories required to generate image
- git clone https://github.com/zynthbox/CustomPiOS.git
- git clone https://github.com/zynthbox/ZynthianOS.git
# Setup Zynthbox Repo sourceline
- echo 'ZYNTHIANOS_ZYNTHBOX_REPO_KEY_URL=\'http://repo.zynthbox.io/testing/repo_key.pub\'' >> ZynthianOS/src/modules/zynthianos/config
- echo 'ZYNTHIANOS_ZYNTHBOX_REPO_SOURCELINE=\'deb http://repo.zynthbox.io/testing zynthbox main\'' >> ZynthianOS/src/modules/zynthianos/config
# Download prebuilt realtime kernel
- wget "http://unofficialpi.org/Distros/RealtimePi/2021-06-15_2021-05-07-realtimepi-buster-armhf-lite-0.5.0.zip" -P ./ZynthianOS/src/image
# Build image
- cd ./ZynthianOS/src
- ../../CustomPiOS/src/update-custompios-paths
- bash -x ./build_dist
- mv build/ZynthianOS/src/workspace/*.img build/$image_name
- echo "Image Size -> $(du -h build/$image_name)"
# Compress image
- xz -zv --threads=$(nproc) build/$image_name
publish-zynthbox-image-armhf: publish-zynthbox-image-armhf:
image: ubuntu:focal image: ubuntu:focal
...@@ -21,4 +47,4 @@ publish-zynthbox-image-armhf: ...@@ -21,4 +47,4 @@ publish-zynthbox-image-armhf:
needs: ["build-zynthbox-image-armhf"] needs: ["build-zynthbox-image-armhf"]
dependencies: ["build-zynthbox-image-armhf"] dependencies: ["build-zynthbox-image-armhf"]
script: script:
- echo "" - echo "Compressed Image Size -> $(du -h build/$image_name.xz)"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment