Commit graph

45 commits

Author SHA1 Message Date
Gerald Pinder
421ca616e7
feat: Use Multi-stage builds to prevent COPY for modules and config (#54)
This allows us to prevent creating extra layers just to run the modules.
Using the bind mount, we are able to connect to a working container that
holds the files needed for building.
2024-02-10 07:10:20 +00:00
gerblesh
d90fbcbb5f
fix: remove deprecated bling COPY for files and rpms (#52)
https://github.com/ublue-os/bling/blob/main/Containerfile the
containerfile copies an empty folder in these locations for backwards
compatability. `/tmp/files` and `/tmp/rpms` have been deprecated from
bling, all of the RPMs have mostly moved to COPR or ublue-os/config

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-07 20:51:53 -05:00
Hikari
0d8fd93917
feat: snippets (#51)
## Goals

This PR adds snippets which is being discussed in #41 .

It will generate snippet lines for *ONLY* our containerfile module

- [x] allow for modules to specify snippets
- [x] append snippets to module run inside Containerfile
- [ ] write supporting test

## Preview
Recipe.yml

```yml
# image will be published to ghcr.io/<user>/<name>
name: orora

description: A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/

base-image: ghcr.io/ublue-os/silverblue-main
image-version: latest # latest is also supported if you want new updates ASAP

modules:
  - type: signing
    snippets:
      - COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD
```

Generated Container File snippet

```docker
RUN chmod +x /tmp/modules/signing/signing.sh && source /tmp/exports.sh && /tmp/modules/signing/signing.sh '{"type":"signing","snippets":["COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD"]}'
COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD
```

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-07 18:03:26 +00:00
Hikari
2492bb0eee
refactor!: rename bb to bluebuild (#50) 2024-02-06 19:55:38 -05:00
Gerald Pinder
245ddf032a Merge branch '40-refactor-clean-standard-implementation-of-cli-modules' 2024-02-05 21:35:50 -05:00
Gerald Pinder
aab4c0038f
fix: Lowecase registry and update IMAGE_REGISTRY arg (#49) 2024-02-05 18:45:09 -05:00
Gerald Pinder
96b680e4e7 refactor: Separate modules into individual templates 2024-02-04 22:23:22 -05:00
Hikari
59c3cf55bd
fix: Update containerfile to check for presence of cosign.pub (#46)
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-04 20:25:26 -06:00
Gerald Pinder
a1751f2f94
fix: Add missing container tags (#37) 2024-02-03 14:09:36 -06:00
Gerald Pinder
7f38fb04e6
feat: Use COPY syntax for files module (#38) 2024-02-03 14:42:42 -05:00
Hikari
e069346e15
feat: Bugreport command (#28)
Add a bug report + completions command(not complete yet) so that new
users can easily submit bugs to us, and I wanted completions for bb
(super easy with clap)

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-01-31 09:51:13 -05:00
Gerald Pinder
bdbbcea7cc
refactor: Separate module template from recipe module (#32) 2024-01-28 19:36:20 -06:00
xyny
42d879a6e5
chore: use GHCR for install.sh (#11)
Trying to make the action install the binary from the container on GHCR
with `podman run --rm ghcr.io/blue-build/cli:main-installer | sudo bash`
(like in the README). Getting some error and this _might_ be related and
might not, but shouldn't hurt to merge either, since I just made the
`cli` package public.

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-01-24 17:27:51 -05:00
Fifty Dinar
9454baa750 fix: Update outdated 60-custom.just 2024-01-22 01:29:41 +00:00
Gerald Pinder
b547a326fd feat!: Upgrade and Rebase commands 2024-01-21 23:23:36 +00:00
Gerald Pinder
9ad018367e fix: Used wrong image for installer in Containerfile template 2024-01-13 22:52:28 -05:00
Gerald Pinder
eaeb79f329 feat: Local image rebasing 2024-01-14 03:02:35 +00:00
Gerald Pinder
ebd399e960 fix: removed unwrap from template to handle with proper error message 2024-01-04 00:10:01 -05:00
Gerald Pinder
dfb315447c fix: stop possible from-file, type module collision in template 2024-01-03 23:50:08 -05:00
Gerald Pinder
d663b7574b refactor: Use askama crate for compile-time template type checking 2024-01-03 23:39:57 -05:00
Gerald Pinder
938ddae891 refactor: inefficiency in generated Containerfile 2024-01-01 18:38:39 +00:00
Gerald Pinder
6a15c56a90 feat(github): Add Github support in Build command 2023-12-30 16:32:57 +00:00
Gerald Pinder
7ce70480bf feat(github): Add basic templating support for Github Actions 2023-12-28 17:59:37 -05:00
Gerald Pinder
6c61cab07e feat(init): Add main README template 2023-12-27 22:16:03 -05:00
Gerald Pinder
556652f92a feat(init): Adding more template files for init 2023-12-27 21:07:02 -05:00
Gerald Pinder
a25e0418c4 Add ability to use incremental caching for rust builds in Earthfile 2023-12-27 16:36:16 -05:00
Gerald Pinder
aa86f48a5d chore: Switch to using typed builders 2023-12-18 23:36:53 -05:00
Gerald Pinder
ebd861cd7e Refactor Command Structs and create Earthly build 2023-12-19 02:23:31 +00:00
Gerald Pinder
785fc2f762 feat!: Remove legacy code" 2023-12-16 20:46:29 -05:00
Gerald Pinder
49d512b3f1 fix: Make containerfile formatting nicer 2023-12-16 16:08:28 -05:00
Gerald Pinder
c6f2e5b18d fix: print module context as json 2023-10-27 22:30:10 -04:00
Gerald Pinder
9564ca0af3 feat(modules)!: Allow containerfile module to print out to main Containerfile 2023-10-27 17:53:32 -04:00
Gerald Pinder
52936fffb1 fix: remove tracing 2023-10-27 17:43:36 -04:00
Gerald Pinder
f2ab9bfd4a fix: Encapsulate module echo in quotes to be passed in as a single arg 2023-10-27 17:43:05 -04:00
Gerald Pinder
85aadf73e5 feat(modules)!: Support new modules based starting point template 2023-10-27 20:26:14 +00:00
Gerald Pinder
073ad4ca4a Put init and build behind feature flags 2023-10-14 14:54:44 -04:00
Gerald Pinder
564ea919a5 Start work on init command 2023-10-11 23:59:16 -04:00
Gerald Pinder
8668a7a442 Fix recipe and templates 2023-10-06 23:59:10 -04:00
Gerald Pinder
c415f6a90a Fix template 2023-10-06 23:28:38 -04:00
Gerald Pinder
2cd8878490 Create autorun script capabilities 2023-10-01 18:54:23 -04:00
Gerald Pinder
69effba45b Allow for custom Containerfile adding 2023-10-01 16:38:18 -04:00
Gerald Pinder
bd6fabd0de Get cli in basic working order 2023-10-01 15:25:53 -04:00
Gerald Pinder
e42cda01ff Able to generate a Containerfile 2023-09-26 23:47:31 -04:00
Gerald Pinder
5361b36238 Making some progress 2023-09-25 23:14:15 -04:00
Gerald Pinder
783c53ebb8 Create templates, serialization structs, and cli arg parsing 2023-09-25 22:45:42 -04:00