Add ERB eval so we can use credentials
This commit is contained in:
@@ -26,4 +26,9 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
configuration = Mrsk::Configuration.new(@config.tap { |c| c[:registry].merge!({ "server" => "ghcr.io" }) })
|
||||
assert_equal "ghcr.io/dhh/app:123", configuration.absolute_image
|
||||
end
|
||||
|
||||
test "erb evaluation of yml config" do
|
||||
configuration = Mrsk::Configuration.load_file Pathname.new(File.expand_path("fixtures/deploy.erb.yml", __dir__))
|
||||
assert_equal "my-user", configuration.registry["username"]
|
||||
end
|
||||
end
|
||||
|
||||
11
test/fixtures/deploy.erb.yml
vendored
Normal file
11
test/fixtures/deploy.erb.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
service: app
|
||||
image: dhh/app
|
||||
servers:
|
||||
- 1.1.1.1
|
||||
- 1.1.1.2
|
||||
env:
|
||||
REDIS_URL: redis://x/y
|
||||
registry:
|
||||
server: registry.digitalocean.com
|
||||
username: <%= "my-user" %>
|
||||
password: <%= "my-password" %>
|
||||
Reference in New Issue
Block a user