Add support for configuration extensions
Allow blocks prefixed with `x-` in the configuration as a place to declare reusable blocks with YAML anchors and aliases. Borrowed from the Docker Compose configuration file format - https://github.com/compose-spec/compose-spec/blob/main/spec.md#extension Thanks to @ruyrocha for the suggestion.
This commit is contained in:
@@ -344,4 +344,12 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
|
||||
assert_raises(Kamal::ConfigurationError) { Kamal::Configuration.new(@deploy_with_roles.merge(retain_containers: 0)) }
|
||||
end
|
||||
|
||||
test "extensions" do
|
||||
dest_config_file = Pathname.new(File.expand_path("fixtures/deploy_with_extensions.yml", __dir__))
|
||||
|
||||
config = Kamal::Configuration.create_from config_file: dest_config_file
|
||||
assert_equal config.role(:web_tokyo).running_traefik?, true
|
||||
assert_equal config.role(:web_chicago).running_traefik?, true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user