-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #938 from henrywang/update_integration
test: Remove tmt bootc plugin code and use released bootc plugin
- Loading branch information
Showing
13 changed files
with
95 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
provision: | ||
hardware: | ||
cpu: | ||
processors: ">= 2" | ||
memory: ">= 6 GB" | ||
virtualization: | ||
is-supported: true | ||
prepare: | ||
- how: install | ||
package: | ||
- git | ||
- podman | ||
- skopeo | ||
- tmt+provision-virtual | ||
- tmt+provision-bootc | ||
- how: shell | ||
script: | | ||
systemctl start libvirtd | ||
systemctl status libvirtd | ||
environment: | ||
TMT_VERBOSE: 1 | ||
execute: | ||
how: tmt | ||
discover: | ||
how: fmf | ||
test: | ||
- /integration | ||
finish: | ||
how: shell | ||
script: | ||
# move all tmt plan logs to tmt plan data folder | ||
- mkdir -p $TMT_PLAN_DATA/test-tmt-log | ||
- cp -r /var/tmp/tmt/run-* $TMT_PLAN_DATA/test-tmt-log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,39 @@ | ||
FROM localhost/bootc | ||
|
||
COPY ./usr/. /usr | ||
# Build bootc from the current git into a c9s-bootc container image. | ||
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:40 to target | ||
# Fedora instead. | ||
# | ||
# You can also generate an image with cloud-init and other dependencies | ||
# with `--build-arg=tmt` which is intended for use particularly via | ||
# https://tmt.readthedocs.io/en/stable/ | ||
ARG base=quay.io/centos-bootc/centos-bootc:stream9 | ||
FROM $base as build | ||
COPY hack/build.sh /build.sh | ||
RUN /build.sh && rm -v /build.sh | ||
COPY . /build | ||
WORKDIR /build | ||
RUN mkdir -p /build/target/dev-rootfs # This can hold arbitrary extra content | ||
# See https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/ | ||
# We aren't using the full recommendations there, just the simple bits. | ||
RUN --mount=type=cache,target=/build/target --mount=type=cache,target=/var/roothome make test-bin-archive && mkdir -p /out && cp target/bootc.tar.zst /out | ||
|
||
FROM $base | ||
# We support e.g. adding cloud-init | ||
ARG variant= | ||
COPY hack/provision-derived.sh /tmp | ||
RUN /tmp/provision-derived.sh "$variant" && rm -f /tmp/*.sh | ||
# Also copy in some default install configs we use for testing | ||
COPY hack/install-test-configs/* /usr/lib/bootc/install/ | ||
# And some test kargs | ||
COPY hack/test-kargs /usr/lib/bootc/kargs.d/ | ||
# Inject our built code | ||
COPY --from=build /out/bootc.tar.zst /tmp | ||
RUN tar -C / --zstd -xvf /tmp/bootc.tar.zst && rm -vrf /tmp/* | ||
# Also copy over arbitrary bits from the target root | ||
COPY --from=build /build/target/dev-rootfs/ / | ||
# Test our own linting | ||
RUN bootc container lint | ||
# For test-22-logically-bound-install | ||
COPY tests/containerfiles/lbi/usr/. /usr | ||
RUN ln -s /usr/share/containers/systemd/curl.container /usr/lib/bootc/bound-images.d/curl.container && \ | ||
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image && \ | ||
ln -s /usr/share/containers/systemd/podman.image /usr/lib/bootc/bound-images.d/podman.image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
summary: Run integration test | ||
test: cd .. && dnf -y builddep bootc && make test-tmt | ||
duration: 1h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters