diff options
Diffstat (limited to 'rpb-centos-installer.yaml')
-rw-r--r-- | rpb-centos-installer.yaml | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/rpb-centos-installer.yaml b/rpb-centos-installer.yaml new file mode 100644 index 0000000000..5b3a115559 --- /dev/null +++ b/rpb-centos-installer.yaml @@ -0,0 +1,90 @@ +- 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.2.1603 + sudo sed -i 's/\$releasever/7.2.1603/g' /etc/yum.repos.d/CentOS-Base.repo + + sudo yum update -y + sudo yum install -y wget lorax cpio xz + + # Call lorax to create the netinstall image + sudo rm -rf netinstall + sudo lorax '--product=CentOS Linux' --version=7 --release=7.2.1603 \ + --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/README.textile << EOF + + h4. 96Boards - Reference Component Enterprise - CentOS Installer + + CentOS Installer (7) produced with the Reference Platform Kernel package. + + Check "https://github.com/96boards/documentation/wiki/Installing-CentOS-7":https://github.com/96boards/documentation/wiki/Installing-CentOS-7 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 ricardo.salveti@linaro.org' |