[//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [DeterminateSystems/flakehub-push](https://github.com/determinatesystems/flakehub-push) from 5 to 6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/determinatesystems/flakehub-push/releases">DeterminateSystems/flakehub-push's releases</a>.</em></p> <blockquote> <h2>v6</h2> <h2>What's Changed</h2> <ul> <li>Add flakehub cache to the macos builds by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/161">DeterminateSystems/flakehub-push#161</a></li> <li>Update cargo deps for gix-path by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/160">DeterminateSystems/flakehub-push#160</a></li> <li>Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/158">DeterminateSystems/flakehub-push#158</a></li> <li>Handle unset derivation outputs attribute by <a href="https://github.com/edolstra"><code>@edolstra</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/163">DeterminateSystems/flakehub-push#163</a></li> <li>Refactor ReleaseMetadata, PushContext by <a href="https://github.com/cole-h"><code>@cole-h</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/165">DeterminateSystems/flakehub-push#165</a></li> <li>Make it easier to test without GitHub or a local FlakeHub by <a href="https://github.com/edolstra"><code>@edolstra</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/164">DeterminateSystems/flakehub-push#164</a></li> <li>ci: disable GHA cache by <a href="https://github.com/cole-h"><code>@cole-h</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/166">DeterminateSystems/flakehub-push#166</a></li> <li>ci: fixup upload-artifact action by <a href="https://github.com/cole-h"><code>@cole-h</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/167">DeterminateSystems/flakehub-push#167</a></li> <li>Export the exact flakeref as an output by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/168">DeterminateSystems/flakehub-push#168</a></li> <li>Flake ref output by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/169">DeterminateSystems/flakehub-push#169</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/67">#67</a> from DeterminateSystems/allow-obliterating-id-token-privs by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/174">DeterminateSystems/flakehub-push#174</a></li> <li>Update deps by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/177">DeterminateSystems/flakehub-push#177</a></li> <li>Cargo.lock: update deps by <a href="https://github.com/cole-h"><code>@cole-h</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/179">DeterminateSystems/flakehub-push#179</a></li> <li>[FH-550] prevent pushes from non-default branch by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/184">DeterminateSystems/flakehub-push#184</a></li> <li>Spruce up README docs by <a href="https://github.com/lucperkins"><code>@lucperkins</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/185">DeterminateSystems/flakehub-push#185</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/71">#71</a> from DeterminateSystems/updates by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/187">DeterminateSystems/flakehub-push#187</a></li> <li>Update deps by <a href="https://github.com/cole-h"><code>@cole-h</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/191">DeterminateSystems/flakehub-push#191</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/74">#74</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-eb3d92718e by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/195">DeterminateSystems/flakehub-push#195</a></li> <li>Document multiple flakes in a repo by <a href="https://github.com/lucperkins"><code>@lucperkins</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/196">DeterminateSystems/flakehub-push#196</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/78">#78</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-0af3b8ec11 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/199">DeterminateSystems/flakehub-push#199</a></li> <li>relay nice warning if user is not authenticated (possibly not signed up) by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/198">DeterminateSystems/flakehub-push#198</a></li> <li>fixup: url join for token status endpoint by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/201">DeterminateSystems/flakehub-push#201</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/79">#79</a> from DeterminateSystems/dependabot/npm_and_yarn/npm_and_yarn-14f44f5325 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/203">DeterminateSystems/flakehub-push#203</a></li> <li>github: improve error for unauthenticated users by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/202">DeterminateSystems/flakehub-push#202</a></li> <li>improve unauthenticated error message (again) by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/204">DeterminateSystems/flakehub-push#204</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/80">#80</a> from DeterminateSystems/fixup-traces by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/205">DeterminateSystems/flakehub-push#205</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/81">#81</a> from DeterminateSystems/dont-capture-some-crashes by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/206">DeterminateSystems/flakehub-push#206</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/82">#82</a> from DeterminateSystems/even-more-crashes by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/207">DeterminateSystems/flakehub-push#207</a></li> <li>Update <code>detsys-ts</code>: Ignore hyphen-sep'd diags (<a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/83">#83</a>) by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/208">DeterminateSystems/flakehub-push#208</a></li> <li>Update <code>detsys-ts</code>: Bump vite from 6.2.3 to 6.2.4 in the npm_and_yarn group (<a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/85">#85</a>) by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/210">DeterminateSystems/flakehub-push#210</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/84">#84</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-73588cc3c5 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/209">DeterminateSystems/flakehub-push#209</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/86">#86</a> from DeterminateSystems/dependabot/npm_and_yarn/npm_and_yarn-2bd33993d4 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/211">DeterminateSystems/flakehub-push#211</a></li> <li>Remove gix-ref dependency by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/212">DeterminateSystems/flakehub-push#212</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/87">#87</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-2f3c1638ee by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/215">DeterminateSystems/flakehub-push#215</a></li> <li>Bump tokio from 1.40.0 to 1.43.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/216">DeterminateSystems/flakehub-push#216</a></li> <li>Bump crossbeam-channel from 0.5.13 to 0.5.15 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/218">DeterminateSystems/flakehub-push#218</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/88">#88</a> from DeterminateSystems/dependabot/npm_and_yarn/npm_and_yarn-b7c6efa8f1 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/220">DeterminateSystems/flakehub-push#220</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/89">#89</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-0b8d2803d6 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/221">DeterminateSystems/flakehub-push#221</a></li> <li>Update wording around paid features by <a href="https://github.com/lucperkins"><code>@lucperkins</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/219">DeterminateSystems/flakehub-push#219</a></li> <li>Update <code>detsys-ts</code>: Update Nix and JS dependencies (<a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/91">#91</a>) by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/223">DeterminateSystems/flakehub-push#223</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/92">#92</a> from DeterminateSystems/dependabot/npm_and_yarn/npm_and_yarn-de653eece3 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/224">DeterminateSystems/flakehub-push#224</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/93">#93</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-a403fbca50 by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/225">DeterminateSystems/flakehub-push#225</a></li> <li>Don't raise on exec by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/227">DeterminateSystems/flakehub-push#227</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/94">#94</a> from DeterminateSystems/dependabot/npm_and_yarn/npm-deps-dde80b0a8d by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/226">DeterminateSystems/flakehub-push#226</a></li> <li>Replace the old upload_s3 and x86_64-linux approach with push-artifact-ids and the CI workflow by <a href="https://github.com/grahamc"><code>@grahamc</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/228">DeterminateSystems/flakehub-push#228</a></li> <li>Update <code>detsys-ts</code>: Merge pull request <a href="https://redirect.github.com/determinatesystems/flakehub-push/issues/95">#95</a> from DeterminateSystems/graham/fh-813-create-a-determinate-nix-action-with-pinned-releases by <a href="https://github.com/detsys-pr-bot"><code>@detsys-pr-bot</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/229">DeterminateSystems/flakehub-push#229</a></li> <li>Switch to determinate-nix-action by <a href="https://github.com/lucperkins"><code>@lucperkins</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/230">DeterminateSystems/flakehub-push#230</a></li> <li>support semaphore via FLAKEHUB_PUSH_OIDC_TOKEN by <a href="https://github.com/colemickens"><code>@colemickens</code></a> in <a href="https://redirect.github.com/DeterminateSystems/flakehub-push/pull/222">DeterminateSystems/flakehub-push#222</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|---|---|---|
| .github | ||
| .helix | ||
| integration-tests | ||
| process | ||
| recipe | ||
| scripts | ||
| src | ||
| template | ||
| test-files | ||
| utils | ||
| .earthlyignore | ||
| .envrc | ||
| .gitignore | ||
| .rusty-hook.toml | ||
| bacon.toml | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| cosign.pub | ||
| distrobox.ini | ||
| Earthfile | ||
| flake.lock | ||
| flake.nix | ||
| install.sh | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
BlueBuild
BlueBuild's command line program that builds Containerfiles and custom images based on your recipe.yml.
Requirements
The bluebuild tool takes advantage of newer build features. Specifically bind, cache, and tmpfs mounts on the RUN instructions. We support using the following tools and their versions:
- Docker - v23 and above
- Podman - v4 and above
- Buildah - v1.29 and above
Installation
Every image created with bluebuild comes with the CLI installed. If you have not built and booted a bluebuild created image, you can follow these instructions to install it.
Cargo
This is the best way to install as it gives you the opportunity to build for your specific environment.
cargo install --locked blue-build
Podman/Docker
This will install the binary on your system in /usr/local/bin.
podman run --pull always --rm ghcr.io/blue-build/cli:latest-installer | bash
docker run --pull always --rm ghcr.io/blue-build/cli:latest-installer | bash
Github Install Script
bash <(curl -s https://raw.githubusercontent.com/blue-build/cli/main/install.sh)
Distrobox
We package an 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. You can clone this repo locally and run:
distrobox assemble create
This will export bluebuild to your local machine and allow you to build images and test out your recipes. For security reasons, we keep this as a rootless image which means you will not be able to use this method to locally rebase to an image. If you want that capability, you should install the CLI tool directly.
Refer to the distrobox documentation for more information.
Nix Flake
You can install this CLI through the Nix flake on Flakehub
Non-nixos
You can install BlueBuild to your global package environment on non-nixos systems by running
# you can replace "*" with a specific tag
nix profile install https://flakehub.com/f/bluebuild/cli/*.tar.gz#bluebuild
NixOS
If you are using a dedicated flake to manage your dependencies, you can add BlueBuild as a flake input throught the fh cli (that can be installed through nixpkgs) and add bluebuild to it.
{pkgs,inputs,...}: {
...
environment.SystemPackages = [
inputs.bluebuild.packages.${pkgs.system}.bluebuild # change bluebuild with the fh added input name
];
...
}
If you are not using a dedicated nix flake, you can add the BlueBuild flake as a variable inside your /etc/nixos/*.nix configuration, though this requires you to run nixos-rebuild with the --impure variable, it is not advisable to do so.
{pkgs,...}:
let
bluebuild = builtins.fetchTarball "https://flakehub.com/f/bluebuild/cli/*.tar.gz";
in {
...
environment.SystemPackages = [
bluebuild.packages.${pkgs.system}.bluebuild
];
...
}
You can also use nix develop .# in this repos directory to run a nix shell with development dependencies and some helful utilities for building BlueBuild!
How to use
Generating Containerfile
Once you have the CLI tool installed, you can run the following to pull in your recipe file to generate a Containerfile.
bluebuild generate -o <CONTAINERFILE> <RECIPE_FILE>
You can then use this with docker, 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.
bluebuild build ./recipes/recipe.yml
This will template out the file and build with docker, podman, or buildah.
Completions
The bluebuild completions command generates shell completions, printed to stdout. These completions can be stored for integration in your shell environment. For example, on a system with bash-completion installed:
# user completions
$ bluebuild completions bash > ~/.local/share/bash-completion/completions/bluebuild
# system-wide completions
$ bluebuild completions bash | sudo tee /usr/share/bash-completion/completions/bluebuild
Subsequent invocations of bluebuild will respond to <Tab> autocompletions:
$ bluebuild # press <Tab>
-v -V --help template bug-report
-q --verbose --version upgrade completions
-h --quiet build rebase help
Currently, bluebuild completions are available for bash, zsh, fish, powershell, nushell, and elvish shell environments. Please follow your shell's documentation for completion scripts.
Local Builds
Switch
With the switch command, you can build and boot an image locally using an oci-archive tarball. The switch command can be run as a normal user and will only ask for sudo permissions when moving the archive into /etc/bluebuild.
bluebuild switch recipes/recipe.yml
You can initiate an immediate restart by adding the --reboot/-r option.
CI Builds
GitHub
You can use our GitHub Action by using the following .github/workflows/build.yml:
name: bluebuild
on:
schedule:
- cron: "00 17 * * *" # build at 17:00 UTC every day
# (20 minutes after last ublue images start building)
push:
paths-ignore: # don't rebuild if only documentation has changed
- "**.md"
pull_request:
workflow_dispatch: # allow manually triggering builds
jobs:
bluebuild:
name: Build Custom Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false # stop GH from cancelling all matrix builds if one fails
matrix:
recipe:
# !! Add your recipes here
- recipe.yml
steps:
# the build is fully handled by the reusable github action
- name: Build Custom Image
uses: blue-build/github-action@v1
with:
recipe: ${{ matrix.recipe }}
cosign_private_key: ${{ secrets.SIGNING_SECRET }}
registry_token: ${{ github.token }}
pr_event_number: ${{ github.event.number }}
Gitlab
We also support GitLab CI! Fun fact, this project started out as a way to build these images in GitLab. You will want to make use of GitLab's Secure Files feature for using your cosign private key for signing. Here's an example of a .gitlab-ci.yml:
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- if: "$CI_COMMIT_TAG"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
when: never
- if: "$CI_COMMIT_BRANCH"
stages:
- build
build-image:
stage: build
image:
name: ghcr.io/blue-build/cli
entrypoint: [""]
services:
- docker:dind
parallel:
matrix:
- RECIPE:
# Add your recipe files here
- recipe.yml
variables:
# Setup a secure connection with docker-in-docker service
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: /certs
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: $DOCKER_TLS_CERTDIR/client
before_script:
# Pulls secure files into the build
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- export COSIGN_PRIVATE_KEY=$(cat .secure_files/cosign.key)
script:
- sleep 5 # Wait a bit for the docker-in-docker service to start
- bluebuild build --push ./recipes/$RECIPE