Skip to content

Commit aa2680f

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 62e7b69 commit aa2680f

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"
@@ -49,7 +51,7 @@ build: package _keygen && _pull-lbi-images
4951
set -xeuo pipefail
5052
test -d target/packages
5153
pkg_path=$(realpath target/packages)
52-
podman build --build-context "packages=${pkg_path}" -t {{base_img}} {{buildargs}} .
54+
podman build {{_nocache_arg}} --build-context "packages=${pkg_path}" -t {{base_img}} {{buildargs}} .
5355

5456
# Show available build variants and current configuration
5557
[group('core')]

0 commit comments

Comments
 (0)