Select Git revision

ab0027 authored
.gitlab-ci.yml 1.82 KiB
stages:
- build
- publish
build-zynthbox-image-armhf:
tags:
- arm64
image: ubuntu:22.04@sha256:cb6ce0db39adc371523a22a0031aa978ad3efbb13a279b7608010c82f8ab214e
stage: build
artifacts:
paths:
- ./ZynthianOS/src/workspace/*.img.xz
expire_in: 1 day
script:
- 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 fdisk xz-utils
# 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 ./workspace/*.img ./workspace/$image_name
- echo "Image Size -> $(du -h ./workspace/$image_name)"
# Compress image
- xz -zv --threads=8 --memory=90% ./workspace/$image_name
- echo "Compressed Image Size -> $(du -h ./workspace/$image_name.xz)"
# Push compressed image to pub.zynthbox.io
- scp -P 3138 -i "$SSH_KEY_PUB_ZYNTHBOX_IO" -o "StrictHostKeyChecking no" "./workspace/$image_name.xz" zynthbox@pub.zynthbox.io:/mnt/pub_zynthbox_io_volume/ISOs/.ci-testing-isos/