Commit bf35baaa authored by Guido Gunther's avatar Guido Gunther

Make tarball build optional

Nobody is using them (although they were deemed important in Siegen) and they
only eat up build time.
parent 2559233e
node {
gitUrl = 'https://source.puri.sm/Librem5/image-builder.git'
branch = 'master'
artifacts = "checksums,${params.board}.img.xz,${params.board}.tar.xz"
artifacts = "checksums,${params.board}.img.xz"
build_on_x86 = [ 'imx6', 'qemu-x86_64' ]
currentBuild.description = "${params.board} image"
......
......@@ -3,7 +3,6 @@
BOARD=imx6
TYPE=unstable
IMAGE=$(BOARD).img
TARBALL=$(BOARD).tar.xz
COMPRESSED=$(IMAGE).xz
CHECKSUM=sha256sums
DEPS=\
......@@ -16,7 +15,7 @@ DEPS=\
all: $(CHECKSUM)
tmp/$(IMAGE).stamp $(IMAGE) $(TARBALL): local.sh-link $(DEPS)
tmp/$(IMAGE).stamp $(IMAGE): local.sh-link $(DEPS)
./build-image -b $(BOARD) -T $(TYPE)
touch tmp/$(IMAGE).stamp
......@@ -24,7 +23,7 @@ tmp/$(IMAGE).stamp $(IMAGE) $(TARBALL): local.sh-link $(DEPS)
xz -T0 --stdout $< > $@.tmp
mv $@.tmp $@
$(CHECKSUM): $(COMPRESSED) $(TARBALL)
$(CHECKSUM): $(COMPRESSED)
sha256sum $^ > $@.tmp
mv $@.tmp $@
......
......@@ -14,6 +14,7 @@ usage() {
echo " -b [imx6|imx8|qemu-x86_64] select the board type."
echo " -d <distro> optional select the puros distro"
echo " -T [ci|unstable] use the artifacts from this build for the image"
echo " -B build rootfs tarball as well"
}
......@@ -53,8 +54,9 @@ pureos_board=imx6
build_type=unstable
NULL=
uboot_bin=
build_tarball=
while getopts ":hb:d:T:" opt; do
while getopts ":hb:d:T:B" opt; do
case ${opt} in
b)
pureos_board=$OPTARG
......@@ -65,6 +67,9 @@ while getopts ":hb:d:T:" opt; do
T)
build_type=$OPTARG
;;
B)
build_tarball=1
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
usage "$0"
......@@ -107,6 +112,7 @@ sudo pureos_board="${pureos_board}" \
https_proxy="${https_apt_proxy:-${https_proxy:-}}" \
qemu="${qemu}" \
fdt_file="${fdt_file}" \
build_tarball="${build_tarball}" \
vmdebootstrap \
--enable-dhcp \
--verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3600M \
......
......@@ -108,7 +108,7 @@ function cleanup_chroot()
umount "${basedir}/proc"
# existence of stamp indicates success
if [ -f "${stamp}" ]; then
if [ -f "${stamp}" ] && [ -n "${build_tarball}" ]; then
build_tarball
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment