Commit graph

288 commits

Author SHA1 Message Date
Michael Haaf
d5f0332d7c
README: add alpine distrobox and shell completions (#149)
A few more tips/tricks I wrote for
https://github.com/blue-build/website/pull/45 that make more sense in
the README
2024-03-31 13:07:58 -04:00
Jordan Pryde
1074a54672
fix: Sign all images in manifest (#148)
Resolves #147

`cosign sign` only signs the provided digest by default. If that digest
is a manifest which is currently the default for images built with
Docker due to
https://docs.docker.com/build/attestations/attestation-storage/, we also
want to sign each image with `--recursive` so that they can be pulled by
any container managers which enforce that (e.g. podman).

Refer to https://github.com/sigstore/cosign/blob/main/doc/cosign_sign.md
for more details.

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-03-29 19:54:37 -04:00
Michael Haaf
47abb2bf4c
docs: add distrobox installation tips (#146)
I had initially added distrobox installation instructions to the website
(see [here](https://github.com/blue-build/website/pull/45), but it has
been suggested that the CLI readme is a more natural place for them.

I have tested the distrobox installation method and procedures on my
home machine and aside from an odd bug (see
https://github.com/blue-build/cli/issues/145) everything is working.
2024-03-29 19:10:01 -04:00
xyny
fcc012bed7
chore: add MODULE_DIRECTORY env var (#142)
This exists in the legacy template:

489ebea77b/build.sh (L13C1-L13C39)

And is also used in many modules, though with
`MODULE_DIRECTORY="${MODULE_DIRECTORY:-"/tmp/modules"}"` to not break
things.

And is documented on the website, because I assumed it existed:
https://blue-build.org/reference/module/#module_directory

I know this probably won't change much, but it's still useful for the
scripts.
2024-03-29 14:06:15 -04:00
Gerald Pinder
8050ce73ee chore: Release 2024-03-27 19:46:03 -04:00
Gerald Pinder
e3ca95dd2f fix: Pulling wrong exports image 2024-03-27 17:50:06 -04:00
Gerald Pinder
1af517e7c6 fix: Remove docker syntax marker 2024-03-27 17:06:46 -04:00
Gerald Pinder
b544fecc25 chore: Fix build.yml 2024-03-27 00:34:39 -04:00
Gerald Pinder
198886c799 chore: Use tag exports instead 2024-03-27 00:33:31 -04:00
Gerald Pinder
72e961c572 chore: Add image source label for exports 2024-03-27 00:27:58 -04:00
Gerald Pinder
19c93ce742 fix: Put export script in own image
HEREDOC support for podman doesn't work exactly 1-1 with Dockerfiles. This fix gives the export script its own image that we mount.
2024-03-27 00:08:58 -04:00
Gerald Pinder
ae9c3ef83a fix: Unable to use SHELL with podman, encapsulate commands in /bin/bash -c 2024-03-26 22:02:41 -04:00
Gerald Pinder
189141924b
feat: Improve logging output (#139) 2024-03-26 12:23:10 -04:00
Gerald Pinder
ab11362a0d
fix: Allow user supplied registry to be set in the template (#135) 2024-03-25 20:27:34 -04:00
Gerald Pinder
2c98a7abc6 fix: Create dir for keys and bins in case they don't exist 2024-03-24 17:28:21 -04:00
Gerald Pinder
399ca604aa chore: Update gitlab-ci section in README 2024-03-24 14:05:42 -04:00
Gerald Pinder
5601a27491 chore: Don't use docker driver for buildx job on main 2024-03-24 11:23:02 -04:00
Gerald Pinder
b515dccd42 fix: Set gzip to default compression format
Turns out rpm-ostree doesn't quite support the new compression format yet.
2024-03-24 11:22:05 -04:00
Gerald Pinder
d0e1b7c8d1
fix: Copy bins and keys with mounts for ostree commit (#132)
I've been investigating more into how ostree works and how it relates to
running `ostree container commit` for each layer. I've decided to move
our pre-installed bins and public keys into their own stages and then
bind mount them into a `RUN` instruction so that we can just use `cp` to
get the files into the image and then call `ostree container commit`.
Now all of our layers in the image (after the base image) will be in the
ostree commit tree.
2024-03-24 06:27:54 +00:00
Gerald Pinder
783ac2c3fb chore: Enable cache builds on main branch 2024-03-23 18:33:34 -04:00
Gerald Pinder
dcfdacc518
feat: Support zstd compression (#134)
All supported versions of podman, buildah, and docker support the zstd
compression format. This format should allow users to pull less data
when updating their computers.
2024-03-23 17:32:21 -04:00
Gerald Pinder
da628db1ee chore: Remove builtin-podman code
This was not being worked on and was becoming too much trouble for our current goals
2024-03-23 15:54:15 -04:00
Gerald Pinder
aa1de26ad9
fix: Allow special characters for export script (#128) 2024-03-21 16:01:46 -04:00
Gerald Pinder
338b9c699e chore: Separate nightly build to not run in CI for now 2024-03-19 22:39:25 -04:00
Gerald Pinder
27dfdbc8a7 chore: Don't build nightly for now 2024-03-19 19:39:24 -04:00
Gerald Pinder
7c34d0c5a8
fix: Allow docker driver to properly use cache (#126)
This fix involves creating a new function for the `BuildDriver` trait
called `build_tag_push`. In order to get the proper logic in place to
make use of `docker buildx`, I had to create a separate function that
would construct the build command to include all of the tags necessary
for pushing. A default implementation of `build_tag_push` will be used
for `podman` and `buildah` which was originally from the build command's
functions. Now that we have custom logic for docker builds, we can take
advantage of using the GitHub cache features without having the `--load`
arg which had a big negative effect on build times. We can now also use
docker for creating local `oci-archive` tarballs for local rebasing.
Making use of the `oci-archive` will require the user to create a
`docker-container` builder as it is not supported on the standard
`docker` builder.

https://docs.docker.com/build/exporters/oci-docker/
2024-03-19 16:51:09 -04:00
Gerald Pinder
5fc4096f0f
chore: Add version checks for upstream tools (#121) 2024-03-17 14:14:07 -04:00
gerblesh
0e3d6eba9e
feat: revert to bash files module (#125)
https://github.com/blue-build/cli/issues/118#issuecomment-1992536977
as mentioned here reverting to the bash files module simplifies the
build process (and allows for better usage of `ostree container
commit`). It also means there are less overall layers and (ideally) a
smaller image as a result. Tested locally and template generation seems
to work just fine
2024-03-17 05:07:52 +00:00
Gerald Pinder
90d2d52ebc
fix: Remove tmpfs for /tmp (#123) 2024-03-17 00:38:18 -04:00
Gerald Pinder
8006af3ec9 refactor: Rename strategies to drivers
This will make the terms similar to the terms of the dependent tools i.e. docker.
2024-03-16 12:47:02 -04:00
Gerald Pinder
f619c4c47c chore: Fix readme path for containerfile module in module.yml 2024-03-16 11:38:06 -04:00
Gerald Pinder
1e3e579df1 chore: Adjust readme path in files module.yml 2024-03-16 11:28:59 -04:00
Gerald Pinder
a54b78c8dc refactor: Enable pedantic clippy lints
Updated files to comply with the new lint.
2024-03-12 18:07:46 -04:00
Hikari
580c3d6ce7
fix: use container skopeo (#110)
the `os_version` is defaulting to the `image_tag` inside containers and
causing our template to use latest tag

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-03-11 23:23:42 +00:00
Gerald Pinder
c084592934 fix: Checkout proper versions when building on main vs a PR 2024-03-11 19:16:30 -04:00
Gerald Pinder
bf6ce3f650 chore: Setup build concurrency to reduce number of simultaneous builds on a PR 2024-03-09 12:29:33 -05:00
Gerald Pinder
2cbc07a33d chore: Update workspace dependency versions 2024-03-08 19:43:28 -05:00
Gerald Pinder
8753e76eeb chore: Prepare for v0.8.2 release 2024-03-08 19:37:08 -05:00
Gerald Pinder
b169dbacbb chore: Update crates to have their own versions starting at CLI version 2024-03-08 19:32:39 -05:00
Gerald Pinder
50813926ad chore: Move cargo release settings to root Cargo.toml 2024-03-08 19:15:42 -05:00
Gerald Pinder
3a2353923d chore: Update builds to use different satellites and have integration tests on their own job 2024-03-06 15:08:16 -05:00
David McCrea
e1a0e3c6a4
fix: update path in comments and README (#115)
Co-authored-by: David McCrea <git@dmccrea.me>
2024-03-06 19:35:28 +00:00
Tulili
80958f60a6
feat: add flakehub entry + nix flake (#109)
Title! This PR should add a Flakehub entry and a Nix flake for this
project :>

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-03-05 21:34:29 +00:00
Gerald Pinder
de49037330
fix: Remove check for specific branches for signing (#114) 2024-03-05 09:18:43 -05:00
Gerald Pinder
e6f97d4258
fix: Add org.opencontainers.image.source LABEL for CI images (#113) 2024-03-03 11:01:24 +00:00
Gerald Pinder
2c8776d2f2
chore: Add integration test for disableuserns.sh (#104) 2024-03-02 15:09:21 -05:00
Hikari
6d2a21160d
fix: retry flag (#111)
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-03-01 21:30:19 +00:00
Gerald Pinder
0ba78fab32
refactor: Update build command to use BuildStrategy (#88) 2024-03-01 11:18:02 -06:00
Gerald Pinder
5bf3dd3939
fix: Add Nvidia Version to main base case (#107) 2024-02-28 17:35:32 -06:00
Gerald Pinder
c920525dd2
fix: Run ostree container commit at the end of each module run (#103)
Since the command `ostree container commit` checks for the presence of
mounted directories, we will be running it at the end of each module
run. We have also updated the final commit to remove from /tmp/ and
/var/ again in case a user creates extra files through custom
instructions.

Closes #101 #95
2024-02-27 23:09:38 -05:00