boringbuilder 0.1.0.alpha.3 → 0.1.0.alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 823ab9ebc22d049c27671d07ea1be44315dbdf3f63cdd29c46cd209e6e5fc279
4
- data.tar.gz: 58c38219ef59ff3bf7515d10140be7500784bf276f5b0ea71edd965d7ae10b86
3
+ metadata.gz: e9749414b7c380d6f22d64e9fbf42e16399553dfa0274cd85209becabf2ecb46
4
+ data.tar.gz: 2a2b30435de56a0be063cd3b6c73737810005546b51e0bb380884ac3edf76cdf
5
5
  SHA512:
6
- metadata.gz: 7812ac305fa0015e0007049f6272a81fcf237db37304522323bad5a7a9947ac2f6e77d9e9788cf57490c31d680c17bda5aa3cc025cc19a4b310f9711b080d907
7
- data.tar.gz: 67a48f5ce9298763f588c2e979a3bcca6b1a38a9c8f9350597f82876c69168c644b480affc62728d27ad1c8d114071267fbc7592a5703446441dc385b3459357
6
+ metadata.gz: 8f7692b32065fa078b63d5a6f76e2c6c0c2d99c6dd7fc95513572e45be6d1ed182436cc8fc5a37e7ffff83cf589bca84d75be4d1182a59b66e3f587d5296d1c7
7
+ data.tar.gz: 6e0480ec13fb058600d8fdf7b7b8ab50c1c041c8f68d365be65d7273f7089f716c21a3247a96b405d2665eed3a2a7c3f49a8a9b49af7c0ef0e1be523202972dd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0.alpha.4 - 2026-08-28
4
+
5
+ - Expose the Rails build task as `boring:build`.
6
+ - Run the Rails task through the same pretty, streaming CLI experience as
7
+ `boringbuilder build`.
8
+ - Keep BoringCache Artifact receipt JSON out of streamed build logs.
9
+
3
10
  ## 0.1.0.alpha.3 - 2026-08-27
4
11
 
5
12
  - Remove Bundler cache metadata before compiling assets so cold and restored Rails builds stay identical.
data/README.md CHANGED
@@ -70,7 +70,7 @@ boringbuilder build --runtime docker --platform linux/arm64
70
70
  Rails applications can also use the included task:
71
71
 
72
72
  ```sh
73
- bin/rails boringbuilder:build
73
+ bin/rails boring:build
74
74
  ```
75
75
 
76
76
  ## Caching
@@ -5,6 +5,8 @@ require "json"
5
5
  module BoringBuilder
6
6
  module Exporters
7
7
  class BoringCache
8
+ RECEIPT_PATH = "/tmp/boringbuilder-artifact.json"
9
+
8
10
  attr_reader :project, :client, :cache
9
11
 
10
12
  def initialize(project, client, environment: ENV)
@@ -31,7 +33,8 @@ module BoringBuilder
31
33
  publisher = client.container.from(cache.cli_image)
32
34
  publisher = cache.prepare_artifact_publisher(publisher)
33
35
  path, publisher = mount_asset(publisher, asset)
34
- output = publisher.with_exec(publish_command(path, asset.kind)).stdout
36
+ publisher = publisher.with_exec(quiet_publish_command(path, asset.kind))
37
+ output = publisher.file(RECEIPT_PATH).contents
35
38
  artifact = JSON.parse(output).fetch("artifact")
36
39
  validate_artifact!(artifact)
37
40
  Receipt.new(artifact_id: artifact.fetch("id"), artifact_name: artifact.fetch("name"))
@@ -73,6 +76,10 @@ module BoringBuilder
73
76
  command
74
77
  end
75
78
 
79
+ def quiet_publish_command(path, kind)
80
+ ["sh", "-c", "exec \"$@\" > #{RECEIPT_PATH}", "boringbuilder-artifact", *publish_command(path, kind)]
81
+ end
82
+
76
83
  def validate_artifact!(artifact)
77
84
  return if artifact.fetch("id", "").start_with?("art_") && artifact.fetch("status", nil) == "ready"
78
85
 
@@ -3,7 +3,7 @@
3
3
  module BoringBuilder
4
4
  class Railtie < Rails::Railtie
5
5
  rake_tasks do
6
- load File.expand_path("tasks/boringbuilder.rake", __dir__)
6
+ load File.expand_path("tasks/boring.rake", __dir__)
7
7
  end
8
8
  end
9
9
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :boring do
4
+ desc "Build the Rails application with Dagger"
5
+ task build: :environment do
6
+ command = ["build"]
7
+ {
8
+ "--runtime" => "BORINGBUILDER_RUNTIME",
9
+ "--platform" => "BORINGBUILDER_PLATFORM",
10
+ "--format" => "BORINGBUILDER_FORMAT",
11
+ "--output" => "BORINGBUILDER_OUTPUT",
12
+ "--push" => "BORINGBUILDER_PUSH",
13
+ "--load" => "BORINGBUILDER_LOAD",
14
+ "--progress" => "BORINGBUILDER_PROGRESS",
15
+ "--exporter" => "BORINGBUILDER_EXPORTER",
16
+ "--artifact-name" => "BORINGBUILDER_ARTIFACT_NAME"
17
+ }.each do |option, environment_name|
18
+ value = ENV.fetch(environment_name, nil)
19
+ command.push(option, value) if value && !value.empty?
20
+ end
21
+
22
+ {
23
+ "--path" => "BORINGBUILDER_PATHS",
24
+ "--file" => "BORINGBUILDER_FILES",
25
+ "--host-path" => "BORINGBUILDER_HOST_PATHS"
26
+ }.each do |option, environment_name|
27
+ values = ENV.fetch(environment_name, "").split(",").reject(&:empty?)
28
+ values.each { |value| command.push(option, value) }
29
+ end
30
+
31
+ command << Rails.root.to_s
32
+ status = BoringBuilder::CLI.start(command)
33
+ raise BoringBuilder::BuildError, "BoringBuilder exited unsuccessfully" unless status.zero?
34
+ end
35
+
36
+ desc "Check the configured container runtime"
37
+ task :doctor do
38
+ requested = ENV.fetch("BORINGBUILDER_RUNTIME", "auto")
39
+ runtime = BoringBuilder::Runtime.new(requested).resolve
40
+ puts "Dagger runtime ready: #{runtime}"
41
+ end
42
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BoringBuilder
4
- VERSION = "0.1.0.alpha.3"
4
+ VERSION = "0.1.0.alpha.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boringbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha.3
4
+ version: 0.1.0.alpha.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - BoringCache
@@ -70,7 +70,7 @@ files:
70
70
  - lib/boringbuilder/ruby_application.rb
71
71
  - lib/boringbuilder/ruby_build.rb
72
72
  - lib/boringbuilder/runtime.rb
73
- - lib/boringbuilder/tasks/boringbuilder.rake
73
+ - lib/boringbuilder/tasks/boring.rake
74
74
  - lib/boringbuilder/version.rb
75
75
  homepage: https://github.com/boringcache/builder
76
76
  licenses:
@@ -78,7 +78,7 @@ licenses:
78
78
  metadata:
79
79
  allowed_push_host: https://rubygems.org
80
80
  homepage_uri: https://github.com/boringcache/builder
81
- source_code_uri: https://github.com/boringcache/builder/tree/v0.1.0.alpha.3
81
+ source_code_uri: https://github.com/boringcache/builder/tree/v0.1.0.alpha.4
82
82
  documentation_uri: https://github.com/boringcache/builder#readme
83
83
  changelog_uri: https://github.com/boringcache/builder/blob/main/CHANGELOG.md
84
84
  bug_tracker_uri: https://github.com/boringcache/builder/issues
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- namespace :boringbuilder do
4
- desc "Build the Rails application with Dagger"
5
- task build: :environment do
6
- options = {}
7
- {
8
- runtime: "BORINGBUILDER_RUNTIME",
9
- platform: "BORINGBUILDER_PLATFORM",
10
- format: "BORINGBUILDER_FORMAT",
11
- output: "BORINGBUILDER_OUTPUT",
12
- publish: "BORINGBUILDER_PUSH",
13
- load: "BORINGBUILDER_LOAD"
14
- }.each do |option, environment_name|
15
- value = ENV.fetch(environment_name, nil)
16
- options[option] = value if value && !value.empty?
17
- end
18
-
19
- {
20
- paths: "BORINGBUILDER_PATHS",
21
- files: "BORINGBUILDER_FILES",
22
- host_paths: "BORINGBUILDER_HOST_PATHS"
23
- }.each do |option, environment_name|
24
- values = ENV.fetch(environment_name, "").split(",").reject(&:empty?)
25
- options[option] = values unless values.empty?
26
- end
27
-
28
- result = BoringBuilder.build(root: Rails.root, **options)
29
- puts "Built with Dagger on #{result.runtime}"
30
- puts "Exported #{result.format}: #{result.path}" if result.exported?
31
- puts "Image: #{result.reference}" if result.published?
32
- end
33
-
34
- desc "Check the configured container runtime"
35
- task :doctor do
36
- requested = ENV.fetch("BORINGBUILDER_RUNTIME", "auto")
37
- runtime = BoringBuilder::Runtime.new(requested).resolve
38
- puts "Dagger runtime ready: #{runtime}"
39
- end
40
- end