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`
2
10
build * ARGS :
3
11
podman build --jobs=4 -t localhost/ bootc {{ ARGS}} .
4
12
5
13
# This container image has additional testing content and utilities
6
14
build-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}} .
8
16
# Keep these in sync with what's used in hack/lbi
9
17
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
10
18
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
+
1
14
prefix ?= /usr
2
15
3
16
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=% ct)
@@ -79,9 +92,6 @@ bin-archive: all
79
92
test-bin-archive : all
80
93
$(MAKE ) install-all DESTDIR=tmp-install && $(TAR_REPRODUCIBLE ) --zstd -C tmp-install -cf target/bootc.tar.zst . && rm tmp-install -rf
81
94
82
- test :
83
- tests/build.sh && tests/test.sh
84
-
85
95
# This gates CI by default. Note that for clippy, we gate on
86
96
# only the clippy correctness and suspicious lints, plus a select
87
97
# set of default rustc warnings.
Original file line number Diff line number Diff line change 5
5
6
6
FROM scratch as context
7
7
# We only need this stuff in the initial context
8
- COPY hack /hack
9
- COPY contrib /contrib
8
+ COPY . /
10
9
11
- FROM localhost/bootc
10
+ # An intermediate layer which caches the extended RPMS
11
+ FROM localhost/bootc as extended
12
12
# We support e.g. adding cloud-init
13
13
ARG variant=
14
14
# And this layer has additional stuff for testing, such as nushell etc.
15
15
RUN --mount=type=bind,from=context,target=/run/context <<EORUN
16
16
set -xeuo pipefail
17
- cd /run/context/hack
17
+ cd /run/context/
18
18
./provision-derived.sh "$variant"
19
+ EORUN
19
20
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
20
26
# For test-22-logically-bound-install
21
27
cp -a lbi/usr/. /usr
22
28
for x in curl.container curl-base.image podman.image; do
23
29
ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x
24
30
done
25
31
26
32
# 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/*
28
34
# 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/*
30
36
# Finally, test our own linting
31
37
bootc container lint --fatal-warnings
32
38
EORUN
You can’t perform that action at this time.
0 commit comments