- job: name: 96boards-reference-centos-installer project-type: freestyle defaults: global logrotate: daysToKeep: 30 numToKeep: 30 properties: - authorization: anonymous: - job-read - job-extended-read - job-workspace linaro: - job-read - job-extended-read - job-build - job-cancel disabled: false node: docker-centos7-aarch64 display-name: 'Reference Platform - CentOS Installer' wrappers: - timestamps - build-name: name: '#${BUILD_NUMBER}' builders: - linaro-publish-token: host: builds.96boards.org - shell: | #!/bin/bash set -ex # Make sure the base image is updated to 7.3.1611 sudo sed -i 's/\$releasever/7.3.1611/g' /etc/yum.repos.d/CentOS-Base.repo sudo yum update -y sudo yum install -y cpio lorax python-requests wget xz # Call lorax to create the netinstall image sudo rm -rf netinstall sudo lorax '--product=CentOS Linux' --version=7 --release=7.3.1611 \ --source=http://mirror.centos.org/altarch/7/os/aarch64/ \ --source=http://repo.linaro.org/rpm/linaro-overlay/centos-7/repo/ \ --isfinal --nomacboot --noupgrade --buildarch=aarch64 '--volid=CentOS 7 aarch64' netinstall/ # Modify initrd to include a default kickstart (that includes the external repository) cd netinstall/images/pxeboot/ sudo mkdir initrd; cd initrd sudo sh -c 'xzcat ../initrd.img | cpio -d -i -m' cat > /tmp/ks.cfg << EOF repo --name="linaro-overlay" --baseurl=http://repo.linaro.org/rpm/linaro-overlay/centos-7/repo/ EOF sudo cp /tmp/ks.cfg ks.cfg sudo sh -c 'find . | cpio -o -H newc | xz --check=crc32 --lzma2=dict=512KiB > ../initrd.img' cd ..; sudo rm -rf initrd cd ../../.. # Final preparation for publishing mkdir out cp -rf lorax.log netinstall/.discinfo netinstall/.treeinfo netinstall/EFI netinstall/images netinstall/LiveOS out/ # Create MD5SUMS file (cd out && find -type f -exec md5sum {} \; | sed "s/ \.\// /g" > MD5SUMS.txt) # Build information KERNEL_VERSION=`cat out/images/pxeboot/vmlinuz | gzip -d - | grep -a "Linux version"` cat > out/HEADER.textile << EOF h4. Reference Platform - CentOS Installer CentOS Installer (7) produced with the Reference Platform Kernel package. Check "https://platforms.linaro.org/documentation/Reference-Platform/Platforms/Enterprise/Documentation/Installation/Centos/README.md":https://platforms.linaro.org/documentation/Reference-Platform/Platforms/Enterprise/Documentation/Installation/Centos/README.md for the install instructions. Build Description: * Build URL: "$BUILD_URL":$BUILD_URL * Kernel: $KERNEL_VERSION EOF # Publish test -d ${HOME}/bin || mkdir ${HOME}/bin wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py time python ${HOME}/bin/linaro-cp.py \ --server ${PUBLISH_SERVER} \ --link-latest \ out snapshots/reference-platform/components/centos-installer/${BUILD_NUMBER}/ publishers: - email: recipients: 'fathi.boudra@linaro.org riku.voipio@linaro.org'