kamal 1.7.1 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b854d1899fd480cb305709662f0db5baa42021cb30c800cc465bca4fb0641b19
|
4
|
+
data.tar.gz: 908e6b78735b170123847a5b89b71fc5020442a34bcc40371afad58d3d27484f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07691f14dba098e98ed17b91bb4a1529d04a75a9ca895c2d24e35ffd508c9e06f448a3536aa3c9d1b94742c49035861dc17068fba2f2e21e6aabb623589ed868'
|
7
|
+
data.tar.gz: a2da79ca3d4bfbc873838809051569621aa54be6a60edbb0d37eae4ab4610612653a8ce7dddb0ebc70e3f2906b28d431929cdd815c413bcdbdeeb52f030d92bc
|
data/lib/kamal/cli/build.rb
CHANGED
@@ -43,8 +43,8 @@ class Kamal::Cli::Build < Kamal::Cli::Base
|
|
43
43
|
cli.create
|
44
44
|
end
|
45
45
|
rescue SSHKit::Command::Failed => e
|
46
|
-
|
47
|
-
|
46
|
+
if e.message =~ /(context not found|no builder|does not exist)/
|
47
|
+
warn "Missing compatible builder, so creating a new one first"
|
48
48
|
cli.create
|
49
49
|
else
|
50
50
|
raise
|
@@ -1,7 +1,13 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# A sample docker-setup hook
|
4
4
|
#
|
5
|
-
# Sets up a Docker network which can then be used by the application’s containers
|
5
|
+
# Sets up a Docker network on defined hosts which can then be used by the application’s containers
|
6
6
|
|
7
|
-
|
7
|
+
hosts = ENV["KAMAL_HOSTS"].split(",")
|
8
|
+
|
9
|
+
hosts.each do |ip|
|
10
|
+
destination = "root@#{ip}"
|
11
|
+
puts "Creating a Docker network \"kamal\" on #{destination}"
|
12
|
+
`ssh #{destination} docker network create kamal`
|
13
|
+
end
|
@@ -31,9 +31,9 @@ class Kamal::Configuration::Validator
|
|
31
31
|
validate_array_of! value, example_value.first.class
|
32
32
|
elsif example_value.is_a?(Hash)
|
33
33
|
case key.to_s
|
34
|
-
when "options"
|
34
|
+
when "options", "args"
|
35
35
|
validate_type! value, Hash
|
36
|
-
when "
|
36
|
+
when "labels"
|
37
37
|
validate_hash_of! value, example_value.first[1].class
|
38
38
|
else
|
39
39
|
validate_against_example! value, example_value
|
data/lib/kamal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -314,7 +314,6 @@ files:
|
|
314
314
|
- lib/kamal/configuration/validation.rb
|
315
315
|
- lib/kamal/configuration/validator.rb
|
316
316
|
- lib/kamal/configuration/validator/accessory.rb
|
317
|
-
- lib/kamal/configuration/validator/alias.rb
|
318
317
|
- lib/kamal/configuration/validator/builder.rb
|
319
318
|
- lib/kamal/configuration/validator/env.rb
|
320
319
|
- lib/kamal/configuration/validator/registry.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class Kamal::Configuration::Validator::Alias < Kamal::Configuration::Validator
|
2
|
-
def validate!
|
3
|
-
super
|
4
|
-
|
5
|
-
name = context.delete_prefix("aliases/")
|
6
|
-
|
7
|
-
if name !~ /\A[a-z0-9_-]+\z/
|
8
|
-
error "Invalid alias name: '#{name}'. Must only contain lowercase letters, alphanumeric, hyphens and underscores."
|
9
|
-
end
|
10
|
-
|
11
|
-
if Kamal::Cli::Main.original_commands.include?(name)
|
12
|
-
error "Alias '#{name}' conflicts with a built-in command."
|
13
|
-
end
|
14
|
-
|
15
|
-
if config["command"].empty?
|
16
|
-
error "Alias '#{name}': command is required."
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|