1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00
Commit Graph

87 Commits

Author SHA1 Message Date
Micah Abbott
9e0a0f887b ci: periodically run update-generated
This introduces a GitHub workflow to periodically run `cargo xtask
update-generated` in order to keep the docs up-to-date with the
latest changes. It will create a PR if changes are detected.

Signed-off-by: Micah Abbott <miabbott@redhat.com>
2025-06-26 15:43:53 -04:00
Colin Walters
fc057e6a1b build-sys: Rework to have toplevel Dockerfile + Justfile
This is aligning with what I did in https://github.com/ostreedev/ostree/pull/3439

- What gets invoked in e.g. GHA should ideally most be `just` commands
  that are easy to run locally too (with sudo in GHA, without sudo locally)
- Move the "core build" to the toplevel so that one can just `podman build`
  directly too (without the Justfile) and have it do something useful
- The "always build and test in a container" helps for LLM-assisted coding
  because what they can do is inherently sandboxed

Signed-off-by: Colin Walters <walters@verbum.org>
2025-06-11 17:44:54 +02:00
ckyrouac
e0301cd45a reinstall: Only pull the image if it's not already present
This enables using a local image with system-reinstall-bootc. A couple
drive by cleanups to the integration tests are included.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-06-06 11:20:51 -04:00
ckyrouac
72c3c74c9e reinstall: Initial set of system-reinstall-bootc integration tests
This adds a few basic integration tests for system-reinstall-bootc, adds
a system-reinstall option to tests-integration to run them, and executes
them as part of the github action.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-06-05 10:27:48 -04:00
Colin Walters
2367f5251e ci: Update podman on fedora-container-tests too
So we can use heredocs.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-05-15 13:27:23 -04:00
Colin Walters
ff952c3c3d install: Honor composefs.enabled=verity
Key off the ostree prepare-root config to require fsverity
on all objects.

As part of this:

- Add a dependency on composefs-rs just for the fsverity querying
  APIs, and as prep for further integration.
- Add `bootc internals fsck`, which verifies the expected
  fsverity state.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-16 10:25:16 -04:00
Colin Walters
728ab1a296 ci/install-tests: Update to newer podman
For here doc support.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-15 13:52:40 -04:00
Joseph Marrero Corchado
5229fbb1fe docs: add footer with CNCF trademark notice
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
2025-03-10 20:59:28 -04:00
Colin Walters
cb99cf5c95 ci: Bump Fedora to 41
For newer ostree

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-03 12:37:38 -05:00
Colin Walters
b55a5d9bc0 deny: Sync with rpm-ostree
We should really have a more centrally-maintained `cargo-deny`
configuration. I'd argue to maintain it here in bootc to
start, but this will be a common thing for other projects
in github.com/containers and elsewhere.

Anyways, this needed updating for the new Unicode-3.0 license
in some updated unicode crates that I saw in rpm-ostree.

While we're here, quiet the duplicate crate warning in the CI
job, as it's just noise. Keep it when running locally so
we have some visibility if we care about it.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-16 08:50:21 -05:00
Xiaofeng Wang
f8b7e946c7 ci: fix labeler action error
Fix "The configuration file (path: .github/labeler.yml) was not
found locally" error

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-12-10 17:44:13 +08:00
Xiaofeng Wang
e2d5dd2cfa ci: remove python checking from CI
No python code in the repo any more

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-12-10 17:38:10 +08:00
Colin Walters
6429eebc61 ci: Run the ostree-ext deploy tests
Signed-off-by: Colin Walters <walters@verbum.org>
2024-12-09 08:05:03 -05:00
Colin Walters
97692bd1c2 Make lints stricter, apply crate wide
Add `dead_code = "deny"` to our default lints; we had
a compiler warning for this in main.

Fix the warning by moving the human readable test code into
`#[cfg(test)]`.

While we're here, move the other lib.rs lints into the crate;
enforcing docs for *everything* at first I thought might be heavy
handed but actually is fine as it only applies to things that
are `pub`, of which we don't actually have that much so it
mainly forced me to add some stub docs for the modules, which
is probably a good idea.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-09-18 13:10:49 -04:00
Platform Engineering Bot
f8314fb48d chore(deps): update embarkstudios/cargo-deny-action action to v2
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-13 10:15:43 -04:00
Chris Kyrouac
091840b09b Merge pull request #691 from cgwalters/doc-experimental
docs: Add experimental section w/`bootc image`
2024-07-18 09:01:46 -04:00
Colin Walters
63bcf63868 build: Use workspace global lints
In relatively recent rust there's a nice way to globally
configure clippy lints for the whole workspace. We can
kill the `custom-lints` target because relatively
recently clippy has a lint for `todo!` and `dbg!` itself.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-17 13:48:12 -04:00
Colin Walters
8a1959b2d2 ci: Document building the docs locally
It was slightly less than obvious.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-16 14:56:08 -04:00
Colin Walters
b26f21788a build-sys: Add make validate-rust
The `make validate-rust` reproduces locally the same checks
we run in CI as gating by default; hook it up to the existing
`make validate`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-15 17:46:27 -04:00
Xiaofeng Wang
45304e386b test: delete unused files
delete workflow file because e2e runs by Packit
delete mockbuild because build bootc rpm on copr

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-07-03 22:20:23 +08:00
Platform Engineering Bot
8932ec9d0d chore(deps): update all dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-07-03 10:35:03 +00:00
Colin Walters
9a758e3a14 tests: Add pytest and nushell based tests
I've been trying to keep this project in "one" programming
language by writing even tests in Rust...but specifically
for our integration tests it's pretty painful not just to
compile them but have to deal with baking them into the base image.

The tmt framework is very GHA like in that it scrapes the
git source tree and copies it into the target environment, which
works really well with scripts.

Now, if you know me you know I am not a fan of dynamic programming
languages like bash and Python. I'm one of those folks that actually
tries to use Rust for things that feel like "scripts" i.e. they're
*mostly* about forking external processes (see the xtask/
crate which uses "xshell").

Some of our testing code is in Rust too. However...there's a giant
tension here because:

- Iteration speed is very important for tests and scripts
- The artifact being an architecture-dependent binary pushes us
  to inject it into container images; having the binary part
  of the bootc image under test conceptually forces us to reprovision
  for each test change, which is super expensive

Most other people when faced with the testing challenge would
just write shell scripts (or Python); that's definitely what tmt
expects people to do.

The podman project has a mix of a "bats" suite which is all
bash based, and a Go-based framework.

The thing is: bash is easy to mess up and has very little ability
to do static analysis. Go (and Python) are very verbose for forking external
processes.

I've been using https://www.nushell.sh/ for my interactive shell
for quite a while; I know just enough to get by day to day
(but honestly sometimes I still type "bash" and run a few things there
 that I know how to express in bash but not nu)

Anyways though, nushell has a lot of desirable properties for
tests (which are basically scripts):

- Architecture independent
- Running an external process requires zero ceremony; it's the
  default!
- But it *is* easy to e.g. scrape JSON from an external binary
  into a rich data structure
- A decently rich standard library

The downside is, it's a new language. And in the end, I'm
not going to say it's the only way to write tests...maybe we
do end up with some more bash. It wouldn't be the end of the world.
But...after playing with this, I definitely like the result.

OK, and after some debate we decided to add Python too, so this
demos a pytest test.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-24 13:46:13 -04:00
Platform Engineering Bot
824f8530db chore(deps): update all dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-06-06 13:15:40 +00:00
Colin Walters
9be6b5a0b0 tests: Drop internal-testing-api, move to tests-integration
Previous work started moving our tests into an external binary;
this is just cleaner because it can test things how a user
would test.  Also, we started using `libtest-mimic` to
have a "real" test scaffolding that e.g. allows selecting
individual tests to run, etc.

Complete the picture here by moving the remaining bits into
the tests-integration binary.  We now run the `tests-integration`
binary in two ways in e.g. Github Actions:

- It's compiled directly on the Ubuntu runner, and orchestrates
  things itself
- It's built in our default container image (Fedora) but as an external
  `/usr/bin/bootc-integration-tests` binary

Also while we're here, drop the kola tests.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-31 17:41:14 -04:00
Colin Walters
94ddb2f372 Merge pull request #556 from cgwalters/main
ci: Clean up fedora CI
2024-05-29 10:24:55 -04:00
Colin Walters
4e74262984 Merge pull request #552 from henrywang/update
test: some updates on test
2024-05-28 14:23:43 -04:00
Xiaofeng Wang
be7f3452d2 test: some updates on test
1. add bootc swtich test
2. add bootc install to-disk test
3. cover more distros, like rhel 9.5, fedora 40 and 41(rawhide)

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-05-24 10:09:03 +08:00
Colin Walters
3b7e799620 ci: Clean up fedora CI
- Build from the hack/Containerfile flow but using Fedora
- Run that container instead of bind mounting in our binaries

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-21 20:02:53 -04:00
Colin Walters
65136e03e5 Move install tests shell script into Rust
A few things going on here:

- Rewrite logic from shell script into Rust (using xshell, so
  it's still convenient to fork commands)
- Make the test logic take an externally-built container image
  instead of using a `-v bootc:/usr/bin/bootc` bind mount
- Build the container image using our stock hack/Containerfile
  in Github Actions instead of building for c9s in GHA
- This all hence starts to make the logic reusable outside
  of Github Actions too; the container build is a known standard thing.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-19 17:58:17 -04:00
John Eckersberg
68c629c158 ci/docs: Add mdbook-linkcheck
Fixes #521

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-05-15 12:08:41 -04:00
Colin Walters
9334e181cc Revert "ci/docs: Add mdbook-linkcheck"
This reverts commit 4f2a30ccbf.
It broke the main docs site.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-15 07:26:43 -04:00
John Eckersberg
4f2a30ccbf ci/docs: Add mdbook-linkcheck
Fixes #521

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-05-14 15:33:29 -04:00
John Eckersberg
7dea3d03ec ci/docs: install mdbook-mermaid
Fixes #513

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-05-06 14:09:04 -04:00
Colin Walters
209489531d ci: Drop unnecessary -ti from podman run invocations
Especially the `-t` forces as pty allocation which causes
bad rendering for things like progress bars in the github actions
flow.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-03 08:22:23 -04:00
Colin Walters
dcd42f7bcf install: Add prominent warning+timeout when targeting host root
It was raised in a discussion that it's rather easy to copy-paste
this command you may find in a document and not fully understand
what it does.

Let's prominently warn by default, with a timeout.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-02 20:39:05 -04:00
Colin Walters
408c9d8644 ci: Add control/skip-ci label
Let's try to skip the testing farm stuff in particular
for documentation only changes.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-04-26 13:49:15 -04:00
Colin Walters
82ccc23410 ci: Add concurrency cancellation
Every time I (or someone else) force pushes to re-add the DCO
we're wasting resources and/or just have added latency.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-04-26 08:35:47 -04:00
Colin Walters
88ba1723ac install: Support being passed --filesystem with no install config
This fixes a logical bug where for base images that don't
have any install configuration at all, we errored out even
if we were explicitly passed `--filesystem`.

This is just about making it easier to test base images
that don't have an install config.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-04-22 10:30:59 -04:00
Colin Walters
d5a76bb0cd ci: Remove WIP packaging workflow
If we want it we'll bring it back, the fact that it was just
empty lines was causing us to have failures in actions.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-04-02 14:15:19 -04:00
Colin Walters
d2ddaacf35 docs: Various updates and fixes
I went through the docs and cleaned some things up, fixed
some missing content, etc.

Also a patch to `xtask` to make it so that `cargo xtask manpages`
works even when $PWD is in `docs`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-29 14:33:22 -04:00
Colin Walters
bab50e162e install: Change no-SELinux -> SELinux to a warning
We believe we have almost all the labeling work here covered,
so degrade this to a warning.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-24 10:31:14 -04:00
Colin Walters
28e5bed9cd Rework SELinux labeling more
First, in the install code, acquire a proper policy object.

Add helpers for writing files/directories that take a policy
object and operate *solely* using fd-relative operations and
don't fork off helper processes.

This is a notable cleanup because we don't need to juggle
absolute file paths *and* fds, which avoids a lot of confusion.
Our usage of a wrapper for the cap-std-ext atomic write API
for generating files ensures that if the file is present,
it will always have the correct label without any race conditions.

Change the one place we now call `chcon` as a helper process
to be an explicit recursive selinux relabeling.  In the
future we should switch to using a direct API instead of
forking off `/usr/bin/chcon` - then everything would be fd-relative.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-18 19:14:00 -04:00
Colin Walters
46285d2b9d install: Add to-existing-root
This is just mild sugar on top of the existing `to-filesystem`
right now.  But, I think we can do more with this later.

Partially addresses https://github.com/containers/bootc/issues/380

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-08 15:07:50 -05:00
Colin Walters
5390a98d30 Merge pull request #379 from cgwalters/pin-eln
ci: Pin eln image
2024-03-07 15:18:00 -05:00
Colin Walters
2c0d9747dc ci: Pin eln image
Until the fix for https://github.com/coreos/fedora-coreos-tracker/issues/1680
finally propagates.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-07 08:07:25 -05:00
Xiaofeng Wang
56d9802e52 test: do not use testing farm to update PR status
Github has job status update. Same job will have two status if
testing farm updates PR status. That does not make sense.

Github job status update can't be disabled, so testing farm
PR job status update has to be disabled.

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-03-07 11:08:33 +08:00
Xiaofeng Wang
cd7e62d5aa test: add integration test
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-03-06 17:10:43 +08:00
Colin Walters
b1d9cd6540 docs: Switch to mdbook, rework
- I don't want my life to involve ruby, and in particular `mdbook serve`
  Just Works out of the box with a single binary
- Reorganize the sections
- Some content cleanup and fixes
- Integrate the man pages into the docs (hooray!)

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-29 21:43:26 -05:00
null
d6bbd3c33b [skip-ci] Update all github action dependencies to v4
Signed-off-by: null <platform-engineering@redhat.com>
2024-02-15 19:14:28 +00:00
Colin Walters
ebeb643b62 ci: Target c9s in more places
There's some instability in eln right now, but more importantly
I think our baseline target should be c9s because that acts
as the real lower bound for what we want to support.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-15 11:00:47 -05:00