Jan Kundrát | a4fbff2 | 2019-03-01 11:03:21 +0100 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -eux -o pipefail |
| 4 | shopt -s failglob |
| 5 | |
| 6 | ZUUL_JOB_NAME=$(jq < ~/zuul-env.json -r '.job') |
| 7 | ZUUL_PROJECT_SRC_DIR=$HOME/$(jq < ~/zuul-env.json -r '.project.src_dir') |
| 8 | ZUUL_PROJECT_SHORT_NAME=$(jq < ~/zuul-env.json -r '.project.short_name') |
| 9 | |
| 10 | BUILD_DIR=~/build |
| 11 | mkdir ${BUILD_DIR} |
| 12 | cd ${BUILD_DIR} |
| 13 | |
| 14 | ${ZUUL_PROJECT_SRC_DIR}/dev-setup-git.sh |
| 15 | |
| 16 | if [[ "${ZUUL_JOB_NAME}" =~ clearfog ]]; then |
| 17 | make czechlight_clearfog_defconfig |
| 18 | else |
| 19 | echo "Unrecognized job name, cannot determine defconfig target" |
| 20 | exit 1 |
| 21 | fi |
| 22 | |
| 23 | echo BR2_PRIMARY_SITE=\"https://ci-logs.gerrit.cesnet.cz/t/public/mirror/buildroot\" >> .config |
| 24 | make source |
| 25 | |
| 26 | make |
| 27 | mv images/update.raucb ~/zuul-output/artifacts/ |
| 28 | |
| 29 | if [[ "${ZUUL_JOB_NAME}" =~ clearfog ]]; then |
| 30 | mv images/u-boot-spl.kwb ~/zuul-output/artifacts/ |
| 31 | fi |
| 32 | |
| 33 | # TODO: USB image as well? (`fallocate -d` to make it sparse) |
| 34 | # TODO: make legal-info |