refactor!: rename bb to bluebuild (#50)

This commit is contained in:
Hikari 2024-02-06 18:55:38 -06:00 committed by GitHub
parent 7cfa191e2a
commit 2492bb0eee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 23 additions and 23 deletions

2
.gitignore vendored
View file

@ -2,5 +2,5 @@
.sccache/
.vscode/
# Local testing for bb recipe files
# Local testing for bluebuild recipe files
/config/

View file

@ -55,7 +55,7 @@ install:
DO cargo+BUILD_RELEASE --BUILD_TARGET=$BUILD_TARGET --NIGHTLY=$NIGHTLY
SAVE ARTIFACT target/$BUILD_TARGET/release/bb
SAVE ARTIFACT target/$BUILD_TARGET/release/bluebuild
common:
FROM ghcr.io/blue-build/earthly-lib/cargo-builder
@ -79,7 +79,7 @@ blue-build-cli:
COPY +cosign/cosign /usr/bin/cosign
COPY (+install/bb --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY) /usr/bin/bb
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY) /usr/bin/bluebuild
ARG TAG
ARG LATEST=false
@ -94,7 +94,7 @@ blue-build-cli-alpine:
RUN apk update && apk add buildah podman skopeo fuse-overlayfs
COPY +cosign/cosign /usr/bin/cosign
COPY (+install/bb --BUILD_TARGET="x86_64-unknown-linux-musl" --NIGHTLY=$NIGHTLY) /usr/bin/bb
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-musl" --NIGHTLY=$NIGHTLY) /usr/bin/bluebuild
ARG TAG
ARG LATEST=false
@ -105,7 +105,7 @@ installer:
ARG NIGHTLY=false
BUILD +install --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY
COPY (+install/bb --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY) /out/bb
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-gnu" --NIGHTLY=$NIGHTLY) /out/bluebuild
COPY install.sh /install.sh
CMD ["cat", "/install.sh"]
@ -122,7 +122,7 @@ integration-test-template:
integration-test-template-containerfile:
ARG NIGHTLY=false
FROM +integration-test-base --NIGHTLY=$NIGHTLY
RUN bb -vv template config/recipe-jp-desktop.yml | tee Containerfile
RUN bluebuild -vv template config/recipe-jp-desktop.yml | tee Containerfile
SAVE ARTIFACT /test
@ -130,20 +130,20 @@ integration-test-build:
ARG NIGHTLY=false
FROM +integration-test-base --NIGHTLY=$NIGHTLY
RUN --privileged bb -vv build config/recipe-jp-desktop.yml
RUN --privileged bluebuild -vv build config/recipe-jp-desktop.yml
integration-test-rebase:
ARG NIGHTLY=false
FROM +integration-test-base --NIGHTLY=$NIGHTLY
RUN --privileged bb -vv rebase config/recipe-jp-desktop.yml
RUN --privileged bluebuild -vv rebase config/recipe-jp-desktop.yml
integration-test-upgrade:
ARG NIGHTLY=false
FROM +integration-test-base --NIGHTLY=$NIGHTLY
RUN mkdir -p /etc/bluebuild && touch /etc/bluebuild/jp-desktop.tar.gz
RUN --privileged bb -vv upgrade config/recipe-jp-desktop.yml
RUN --privileged bluebuild -vv upgrade config/recipe-jp-desktop.yml
integration-test-base:
ARG NIGHTLY=false

View file

@ -12,7 +12,7 @@ BlueBuild's command line program that builds Containerfiles and custom images ba
### Distrobox
We package a `fedora-toolbox` and `alpine` image with all the tools needed to run `bb`. You can use `distrobox` to run the application without needing to install it on your machine.
We package a `fedora-toolbox` and `alpine` image with all the tools needed to run `bluebuild`. You can use `distrobox` to run the application without needing to install it on your machine.
```bash
distrobox create blue-build --image ghcr.io/blue-build/cli
@ -42,17 +42,17 @@ podman run --rm ghcr.io/blue-build/cli:latest-installer | bash
Once you have the CLI tool installed, you can run the following to pull in your recipe file to generate a `Containerfile`.
```bash
bb template -o <CONTAINERFILE> <RECIPE_FILE>
bluebuild template -o <CONTAINERFILE> <RECIPE_FILE>
```
You can then use this with `podman` or `buildah` to build and publish your image. Further options can be viewed by running `bb template --help`
You can then use this with `podman` or `buildah` to build and publish your image. Further options can be viewed by running `bluebuild template --help`
### Building
If you don't care about the details of the template, you can run the `build` command.
```bash
bb build ./config/recipe.yaml
bluebuild build ./config/recipe.yaml
```
This will template out the file and build with `buildah` or `podman`.
@ -64,7 +64,7 @@ This will template out the file and build with `buildah` or `podman`.
If you want to test your changes, you can do so by using the `rebase` command. This will create an image as a `.tar.gz` file, store it in `/etc/blue-build`, an run `rpm-ostree rebase` on that newly built file.
```bash
sudo bb rebase config/recipe.yml
sudo bluebuild rebase config/recipe.yml
```
You can initiate an immediate restart by adding the `--reboot/-r` option.
@ -74,7 +74,7 @@ You can initiate an immediate restart by adding the `--reboot/-r` option.
When you've rebased onto a local image archive, you can update your image for your recipe by running:
```bash
sudo bb upgrade config/recipe.yml
sudo bluebuild upgrade config/recipe.yml
```
The `--reboot` argument can be used with this command as well.
@ -157,7 +157,7 @@ build-image:
SIGSTORE_ID_TOKEN:
aud: sigstore
script:
- bb build --push ./config/$RECIPE
- bluebuild build --push ./config/$RECIPE
```
## Future Features

View file

@ -23,7 +23,7 @@ sudo podman run \
tail -f /dev/null
set +e
sudo podman cp blue-build-installer:/out/bb /usr/local/bin/bb
sudo podman cp blue-build-installer:/out/bluebuild /usr/local/bin/bluebuild
RETVAL=$?
set -e
@ -33,8 +33,8 @@ if [ $RETVAL != 0 ]; then
echo "Failed to copy file"
exit 1
else
# sudo mv bb /usr/local/bin/
echo "Finished! BlueBuild has been installed at /usr/local/bin/bb"
# sudo mv bluebuild /usr/local/bin/
echo "Finished! BlueBuild has been installed at /usr/local/bin/bluebuild"
cleanup
fi

View file

@ -114,7 +114,7 @@ pub struct BuildCommand {
///
/// For example:
///
/// bb build --public-key env://PUBLIC_KEY ...
/// bluebuild build --public-key env://PUBLIC_KEY ...
#[cfg(feature = "sigstore")]
#[arg(long)]
#[builder(default, setter(into, strip_option))]
@ -128,7 +128,7 @@ pub struct BuildCommand {
///
/// For example:
///
/// bb build --private-key env://PRIVATE_KEY ...
/// bluebuild build --private-key env://PRIVATE_KEY ...
#[cfg(feature = "sigstore")]
#[arg(long)]
#[builder(default, setter(into, strip_option))]

View file

@ -18,7 +18,7 @@ impl BlueBuildCommand for CompletionsCommand {
generate(
self.shell,
&mut BlueBuildArgs::command(),
"bb",
"bluebuild",
&mut std::io::stdout().lock(),
);

View file

@ -33,7 +33,7 @@ COPY --from=ghcr.io/blue-build/cli:
{{ tag }}
{%- else -%}
latest-installer
{%- endif %} /out/bb /usr/bin/bb
{%- endif %} /out/bluebuild /usr/bin/bluebuild
COPY config /tmp/config/