Commit graph

255 commits

Author SHA1 Message Date
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
Gerald Pinder
ca6cd80088
feat: Make use of rpm-ostree cache (#68)
After setting up the tmpfs mount for /var, rpm-ostree started to not
have cache throughout the single build. This creates a cache for
rpm-ostree that is tied to the specific recipe being built. This will
allow subsequent builds of a recipe to be faster and not interfere with
the cache of another recipe, especially if they are on different OS
versions
2024-02-18 23:48:35 -05:00
gerblesh
498deb6f37
fix: check for GITHUB_TOKEN instead of SIGSTORE_ID_TOKEN for github OIDC (#72)
the `SIGSTORE_ID_TOKEN` env var is not declared inside of github
actions, however the block that does OIDC signing requires it, this
changes it so that it matches for `GITHUB_TOKEN` in the second block
instead of `SIGSTORE_ID_TOKEN`, (hopefully) using OIDC instead of pubkey
auth
2024-02-19 02:45:34 +00:00
Gerald Pinder
26abf21059 chore: Replace tabs with spaces in Containerfile template 2024-02-18 11:28:32 -05:00
Gerald Pinder
93b40f8d73
feat: Allow user to use source images (#69) 2024-02-18 10:24:37 -06:00
Gerald Pinder
369fbab03f
feat: Use tmpfs mount for /tmp and /var (#67)
This allows scripts to create as many files as they need in /tmp and
/var without having to worry about them being included in the final
image. Now the last instruction will only be the ostree container commit
2024-02-17 19:16:06 +00:00
Gerald Pinder
98398788f7
feat(podman-api): Clean up working container for SIGINT and SIGTERM (#14)
Co-authored-by: Hikaru (ひかる, ヒカル) <lecoqjacob@gmail.com>
2024-02-14 15:04:47 -06:00
Gerald Pinder
4fde628f82 fix: Make sure cosign.pub exists before trying to check key validity 2024-02-14 12:36:14 -05:00
Gerald Pinder
f22823a4c2 chore: Print out stderr from login attempts if login fails 2024-02-14 11:45:17 -05:00
gerblesh
d26382b85f
feat: use WORKDIR and ENTRYPOINT for cli containers (#63)
required for running the bluebuild CLI directly from podman (needed for
latest version of bluebuild for github action)

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-14 16:40:17 +00:00