Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.0.alpha.8 - 2026-10-16

- Update the BoringCache CLI and build images to 1.42.0 with pinned multi-platform digests.
- Trust copied project Mise configuration inside build containers before installing tools, while retaining
paranoid mode.

## 0.1.0.alpha.7 - 2026-10-02

- Require Dagger Ruby 0.11.1 or newer for startup status and Dagger 0.21.9 support.
Expand Down
2 changes: 2 additions & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ end

`pipeline.mise` prepares the requested tools and application source in a Dagger container. Project versions in
`mise.toml`, `.mise.toml`, or `.tool-versions` override recipe fallbacks, and `mise.lock` is respected when present.
The build trusts the copied project configuration files inside its container before installing tools. Mise's
paranoid mode remains enabled; host-side Mise trust is unchanged.
Any tool in the [Mise registry](https://mise.jdx.dev/registry.html) can use the same shape.

`pipeline.run` persists the declared path in the local Dagger engine or through BoringCache when shared credentials
Expand Down
8 changes: 4 additions & 4 deletions lib/boringbuilder/boring_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

module BoringBuilder
class BoringCache
CLI_IMAGE = "ghcr.io/boringcache/base:bookworm-v1.19.4@" \
"sha256:84d1e168a50fd086ecd4fdb2fd96f689982a6f3c61454acd8c7189e336f8f3ae"
BUILD_IMAGE = "ghcr.io/boringcache/base:bookworm-build-v1.19.4@" \
"sha256:df4461581214c0052157041238a67b8da420e1399e4024bc857c68c74a9721cb"
CLI_IMAGE = "ghcr.io/boringcache/base:bookworm-v1.42.0@" \
"sha256:9d663a781f5e2ff07ee430cb73e99b6b01e00584583c78c27062680842673430"
BUILD_IMAGE = "ghcr.io/boringcache/base:bookworm-build-v1.42.0@" \
"sha256:0d621a60a42741365f69d991b121e1a1ea3b900c360b11e265d99e27eeaaa311"
TOKEN_NAMES = %w[BORINGCACHE_RESTORE_TOKEN BORINGCACHE_SAVE_TOKEN].freeze
ENVIRONMENT_NAMES = %w[BORINGCACHE_API_URL BORINGCACHE_DEFAULT_WORKSPACE BORINGCACHE_WORKSPACE].freeze

Expand Down
8 changes: 7 additions & 1 deletion lib/boringbuilder/mise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class Mise
DEFAULT_IMAGE = BoringCache::BUILD_IMAGE
CACHE_PATH = "/mise/cache"
INSTALL_COMMAND = %w[mise install].freeze
METADATA_FILES = %w[mise.toml .mise.toml .tool-versions mise.lock].freeze
CONFIG_FILES = %w[mise.toml .mise.toml .tool-versions].freeze
METADATA_FILES = [*CONFIG_FILES, "mise.lock"].freeze
ENVIRONMENT = {
"MISE_CACHE_DIR" => CACHE_PATH,
"MISE_DATA_DIR" => "/mise",
Expand All @@ -32,6 +33,11 @@ def install(container, tools:, workdir:, only: nil)
container = with_environment(container)
container = container.with_workdir(workdir)
.with_new_file("/etc/mise/config.toml", system_config(tools))
CONFIG_FILES.each do |name|
next unless project.root.join(name).file?

container = container.with_exec(["mise", "trust", "--", "#{workdir}/#{name}"])
end
command = [*INSTALL_COMMAND, *Array(only).map(&:to_s)]
pipeline.run(
container,
Expand Down
2 changes: 1 addition & 1 deletion lib/boringbuilder/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BoringBuilder
VERSION = "0.1.0.alpha.7"
VERSION = "0.1.0.alpha.8"
end
19 changes: 19 additions & 0 deletions test/boringbuilder/pipeline_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ def test_creates_a_source_mounted_mise_toolchain
assert_called_with_path client, :with_mounted_cache, BoringBuilder::Mise::CACHE_PATH
end

def test_trusts_copied_project_configs_before_installing_tools
root = build_project
File.write(root.join(".mise.toml"), "[tools]\nnode = \"24\"\n")
File.write(root.join(".tool-versions"), "node 24\n")
File.write(root.join("mise.lock"), "")
pipeline, client = pipeline_for(environment: {}, root: root)

pipeline.mise(tools: { node: "24" }, workdir: "/workspace")

commands = client.calls.filter_map { |name, arguments, _| arguments.first if name == :with_exec }
trust_commands = commands.select { |command| command.first(2) == %w[mise trust] }

assert_equal [
%w[mise trust -- /workspace/.mise.toml],
%w[mise trust -- /workspace/.tool-versions]
], trust_commands
assert_operator commands.index(trust_commands.last), :<, commands.index(BoringBuilder::Mise::INSTALL_COMMAND)
end

def test_uses_boringcache_for_the_mise_toolchain_when_shared_credentials_are_present
pipeline, client = pipeline_for(
environment: {
Expand Down