Skip to content

Commit 2077278

Browse files
committed
build-sys: Add BOOTC_nocache option to force rebuild without cache
This is useful when debugging issues with stale cached layers, such as package version skew between base images and repos. Signed-off-by: Colin Walters <walters@verbum.org>
1 parent d610be7 commit 2077278

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Justfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ buildroot_base := env("BOOTC_buildroot_base", "quay.io/centos/centos:stream10")
2828
extra_src := env("BOOTC_extra_src", "")
2929

3030
# Internal variables
31+
nocache := env("BOOTC_nocache", "")
32+
_nocache_arg := if nocache != "" { "--no-cache" } else { "" }
3133
testimage_label := "bootc.testimage=1"
3234
lbi_images := "quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman:latest"
3335
fedora-coreos := "quay.io/fedora/fedora-coreos:testing-devel"
@@ -79,7 +81,7 @@ build: package _keygen && _pull-lbi-images
7981
set -xeuo pipefail
8082
test -d target/packages
8183
pkg_path=$(realpath target/packages)
82-
podman build --build-context "packages=${pkg_path}" -t {{base_img}} {{buildargs}} .
84+
podman build {{_nocache_arg}} --build-context "packages=${pkg_path}" -t {{base_img}} {{buildargs}} .
8385

8486
# Build a sealed composefs image (alias for variant=composefs-sealeduki-sdboot)
8587
[group('core')]

0 commit comments

Comments
 (0)