Commit graph

264 commits

Author SHA1 Message Date
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
Hikari
164588dca3
docs: add install script from github option (#102) 2024-02-27 17:40:45 -05:00
Gerald Pinder
7e6453664e
fix: Filter out / in tag names (#94) 2024-02-26 20:04:14 -06:00
Gerald Pinder
cf89a4bd6d Merge branch 'patch/v0.8.1' 2024-02-26 09:49:04 -05:00
Gerald Pinder
83c966b560 chore: Release blue-build version 0.8.1 2024-02-26 09:28:33 -05:00
Gerald Pinder
0fd06cacd7 fix: COPY yq into final image for modules 2024-02-26 09:27:12 -05:00
Gerald Pinder
fd94962ff5 fix: COPY yq for final image for modules to work 2024-02-26 09:21:54 -05:00
Gerald Pinder
1978339993 chore: Update modules.json to reflect change in dir layout 2024-02-25 21:26:36 -05:00
Gerald Pinder
910e0434b6
refactor: Move templates to their own crate (#83)
This PR logically separates out parts of the code to their own crates. This will be useful for future Tauri App development.
2024-02-25 14:45:33 -06:00
Gerald Pinder
ce8f889dc2 chore: Release blue-build version 0.8.0 2024-02-25 12:11:05 -05:00
xyny
cc7079d21a
chore: update default module source (#76)
to be merged right after the bling repository is moved
2024-02-25 17:06:37 +00:00
Gerald Pinder
d006e0b6e0
docs: Add module documentation for 'containerfile' and 'files' (#82)
Co-authored-by: xynydev <60004820+xynydev@users.noreply.github.com>
2024-02-25 10:41:38 +00:00
Gerald Pinder
4c8a8f7aa8
refactor: Move modules into their own directory structure (#80)
This separates out the module template logic so that it is easier to
undertstand what each section does. This will also allow creating in
repo documentation for any special modules that don't use a bash base.
2024-02-24 07:16:30 +00:00
Hikari
0b4e1003a2
feat: add retry options to cli build command (#81)
An issue was filed for adding retry logic to our push_image command in
the CLI. https://github.com/blue-build/cli/issues/79.

This PR adds:
- **retry flag**
  - `-r`
  - defaults to true 
- **retry_count flag**
  - `--retry_count`
  - defaults to 1

This functionality will be extended to our other services in build
(podman api as well once that is hooked up), but this is the initial
ground work

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-24 04:53:50 +00:00
qoijjj
681aab4a85
fix: allow empty custom modules dir (#77)
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-22 15:49:45 -05:00
Gerald Pinder
8931a22e29
feat: Allow use of akmods module (#71)
The akmods module require having the /rpms directory put into /tmp/rpms.
By default we will mount the akmods image with the `main-{{ os_version
}}` tag.

If a user supplies `base` for the akmods module in their recipe, it will
pull that image tag instead and mount the resulting /rpms.

```yaml
modules:
- type: akmods
  base: surface
  install:
  - openrazer
```

This would pull the image `ghcr.io/ublue-os/akmods:surface-39`.

A user can also supply `nvidia-version` with the numerical version of
the driver you would like to use. Doing so will mount the appropriate
`akmods-nvidia` image with the version of the driver you want in the
tag.

```yaml
modules:
- type: akmods
  nvidia-version: 545
  install:
  - nvidia
```

This would pull the image `ghcr.io/ublue-os/akmods-nvidia:main-39-545`
and `ghcr.io/ublue-os/akmods:main-39`.

This uses bind mount like all the other modules so these files will not
persist into the final image.
2024-02-22 18:41:45 +00:00
Hikari
ee2a834b28
feat: block overriding (#74)
This PR helps transition users who may not realize that we override
their Containefile.

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-21 23:34:28 +00:00
Gerald Pinder
84de477635 fix: Use GH_TOKEN as GITHUB_TOKEN is a protected env var 2024-02-20 20:57:59 -05:00
Gerald Pinder
54742ecaa1
refactor: Use GITHUB_TOKEN instead of REGISTRY_TOKEN (#75)
To keep things as consistent as possible, we're switching to using the
GITHUB_TOKEN env var for login instead. Env vars were also all pulled
out into their own constants to make things more consistent.

This change also includes prioritizing public/private key signing over
OIDC keyless for GitHub for an easier transition. It would require the
user to delete their `cosign.pub` file from their repo in order to start
using the keyless method.
2024-02-19 23:30:39 -05:00
fiftydinar
411e782dc8
fix: Remove trailing newlines from yaml arrays (#73)
Trailing newlines is something that we will never need as an
information, so it can only cause issues with parsing yaml values.

I scratched my head for 10 minutes on why my variable has a trailing
newline when I use `readarray -t` everywhere. Then I remembered
get_yaml_array function.

This should not affect current working modules at all, but it would be
good to test before landing.

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-20 02:04:57 +00:00
Gerald Pinder
2a85c2732b chore: Fix integration-tests for forks 2024-02-19 20:52:20 -05:00
Gerald Pinder
0012eadef7 chore: Add trace log for github cosign verify 2024-02-19 15:04:13 -05:00
Gerald Pinder
fc489eca32 chore: Run integration tests on a separate satellite to keep build cache free 2024-02-19 14:37:55 -05:00
Gerald Pinder
16ffbb343f fix: Switch to using --certificate-identity-regexp for Github Keyless verification 2024-02-19 14:22:26 -05:00
Gerald Pinder
b087474cf2 fix: Use REGISTRY_TOKEN for GitHub OIDC signing 2024-02-19 13:48:08 -05:00