File tree Expand file tree Collapse file tree 4 files changed +54
-22
lines changed Expand file tree Collapse file tree 4 files changed +54
-22
lines changed Original file line number Diff line number Diff line change 1- # The big one - this can get HUGE and we don't want
2- # to copy it around.
3- target
4- # This one can have large .qcow2 files written by coreos-assembler
5- .cosa
6- # TMT interprets these, not the container build
7- plans /
8- # These only affect flow outside of the container
9- Dockerfile
10- Justfile
11- hack /Containerfile
1+ # Exclude everything by default, then include just what we need
2+ # Especially note this means that .git is not included, and not tests/
3+ # to avoid spurious rebuilds.
4+ *
5+
6+ # This one signals we're in a bootc toplevel
7+ ! ADOPTERS.md
8+ # Toplevel build bits
9+ ! Makefile
10+ ! Cargo. *
11+ # We do build manpages from markdown
12+ ! docs /
13+ # We use the spec file
14+ ! contrib /
15+ # The systemd units and baseimage bits end up in installs
16+ ! systemd /
17+ ! baseimage /
18+ # And finally of course all the Rust sources
19+ ! crates /
Original file line number Diff line number Diff line change 1- # Build the container image from current sources
1+ # The default entrypoint to working on this project.
2+ # Commands here typically wrap e.g. `podman build` or
3+ # other tools which might launch e.g. VMs.
4+ #
5+ # See also `Makefile`.
6+
7+ # Build the container image from current sources.
8+ # Note commonly you might want to override the base image via e.g.
9+ # `just build --build-arg=base=quay.io/fedora/fedora-bootc:42`
210build * ARGS :
311 podman build --jobs=4 -t localhost/ bootc {{ ARGS}} .
412
513# This container image has additional testing content and utilities
614build-integration-test-image * ARGS :
7- podman build --jobs=4 -t localhost/ bootc-integration -f hack / Containerfile {{ ARGS}} .
15+ cd hack && podman build --jobs=4 -t localhost/ bootc-integration -f Containerfile {{ ARGS}} .
816 # Keep these in sync with what's used in hack/lbi
917 podman pull -q --retry 5 --retry-delay 5 s quay.io/ curl/ curl:latest quay.io/ curl/ curl-base:latest registry.access.redhat.com/ ubi9/ podman:latest
1018
Original file line number Diff line number Diff line change 1+ # Understanding Makefile vs Justfile:
2+ #
3+ # This file MUST NOT:
4+ # - Spawn podman or virtualization tools
5+ # - Invoke `sudo`
6+ #
7+ # Stated positively, the code invoked from here is only expected to
8+ # operate as part of "a build" that results in a bootc binary
9+ # plus data files. The two key operations are `make`
10+ # and `make install`.
11+ # We expect code run from here is inside a container with low
12+ # privileges - running as a nonzero UID even.
13+
114prefix ?= /usr
215
316SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=% ct)
@@ -79,9 +92,6 @@ bin-archive: all
7992test-bin-archive : all
8093 $(MAKE ) install-all DESTDIR=tmp-install && $(TAR_REPRODUCIBLE ) --zstd -C tmp-install -cf target/bootc.tar.zst . && rm tmp-install -rf
8194
82- test :
83- tests/build.sh && tests/test.sh
84-
8595# This gates CI by default. Note that for clippy, we gate on
8696# only the clippy correctness and suspicious lints, plus a select
8797# set of default rustc warnings.
Original file line number Diff line number Diff line change 55
66FROM scratch as context
77# We only need this stuff in the initial context
8- COPY hack /hack
9- COPY contrib /contrib
8+ COPY . /
109
11- FROM localhost/bootc
10+ # An intermediate layer which caches the extended RPMS
11+ FROM localhost/bootc as extended
1212# We support e.g. adding cloud-init
1313ARG variant=
1414# And this layer has additional stuff for testing, such as nushell etc.
1515RUN --mount=type=bind,from=context,target=/run/context <<EORUN
1616set -xeuo pipefail
17- cd /run/context/hack
17+ cd /run/context/
1818./provision-derived.sh "$variant"
19+ EORUN
1920
21+ # And the configs
22+ FROM extended
23+ RUN --mount=type=bind,from=context,target=/run/context <<EORUN
24+ set -xeuo pipefail
25+ cd /run/context
2026# For test-22-logically-bound-install
2127cp -a lbi/usr/. /usr
2228for x in curl.container curl-base.image podman.image; do
2329 ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x
2430done
2531
2632# Add some testing kargs into our dev builds
27- install -D -t /usr/lib/bootc/kargs.d /run/context/hack/ test-kargs/*
33+ install -D -t /usr/lib/bootc/kargs.d test-kargs/*
2834# Also copy in some default install configs we use for testing
29- install -D -t /usr/lib/bootc/install/ /run/context/hack/ install-test-configs/*
35+ install -D -t /usr/lib/bootc/install/ install-test-configs/*
3036# Finally, test our own linting
3137bootc container lint --fatal-warnings
3238EORUN
You can’t perform that action at this time.
0 commit comments