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