boringbuilder 0.1.0.alpha.2 → 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 +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +1 -1
- data/lib/boringbuilder/exporters/boring_cache.rb +8 -1
- data/lib/boringbuilder/railtie.rb +1 -1
- data/lib/boringbuilder/ruby_build.rb +6 -0
- data/lib/boringbuilder/tasks/boring.rake +42 -0
- data/lib/boringbuilder/version.rb +1 -1
- metadata +3 -3
- data/lib/boringbuilder/tasks/boringbuilder.rake +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9749414b7c380d6f22d64e9fbf42e16399553dfa0274cd85209becabf2ecb46
|
|
4
|
+
data.tar.gz: 2a2b30435de56a0be063cd3b6c73737810005546b51e0bb380884ac3edf76cdf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f7692b32065fa078b63d5a6f76e2c6c0c2d99c6dd7fc95513572e45be6d1ed182436cc8fc5a37e7ffff83cf589bca84d75be4d1182a59b66e3f587d5296d1c7
|
|
7
|
+
data.tar.gz: 6e0480ec13fb058600d8fdf7b7b8ab50c1c041c8f68d365be65d7273f7089f716c21a3247a96b405d2665eed3a2a7c3f49a8a9b49af7c0ef0e1be523202972dd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
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
|
+
|
|
10
|
+
## 0.1.0.alpha.3 - 2026-08-27
|
|
11
|
+
|
|
12
|
+
- Remove Bundler cache metadata before compiling assets so cold and restored Rails builds stay identical.
|
|
13
|
+
|
|
3
14
|
## 0.1.0.alpha.2 - 2026-08-27
|
|
4
15
|
|
|
5
16
|
- Stream clean, Docker-style build steps and command output through Dagger Ruby.
|
|
6
17
|
- Run Bundler with the available CPUs unless `BUNDLE_JOBS` is explicitly configured.
|
|
7
|
-
- Keep
|
|
18
|
+
- Keep dependency cache metadata out of Rails artifacts.
|
|
8
19
|
|
|
9
20
|
## 0.1.0.alpha.1 - 2026-08-27
|
|
10
21
|
|
data/README.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
|
@@ -63,6 +63,12 @@ module BoringBuilder
|
|
|
63
63
|
name: "[build] RUN bundle check",
|
|
64
64
|
workdir: application_path
|
|
65
65
|
)
|
|
66
|
+
builder = pipeline.exec(
|
|
67
|
+
builder,
|
|
68
|
+
%w[rm -rf .bundle/cache],
|
|
69
|
+
name: "[build] RUN rm -rf .bundle/cache",
|
|
70
|
+
workdir: application_path
|
|
71
|
+
)
|
|
66
72
|
builder = precompile(builder)
|
|
67
73
|
builder = pipeline.step("[build] Write Bundler configuration", builder) { write_bundle_config(_1) }
|
|
68
74
|
|
|
@@ -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
|
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.
|
|
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/
|
|
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.
|
|
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
|