Add push_env config
This setting allows you to automatically push env files when deploying. The default is not to push any files, but you can set it to `all`, `clear` or `secret` to push the relevant files. The most useful setting is `clear` which will push the clear env files every time you deploy. In addition you can choose the env_type to push when calling `kamal env push` directly: ``` kamal env push --env-type clear kamal env push --env-type secret kamal env push --env-type all # same as kamal env push ```
This commit is contained in:
@@ -317,4 +317,13 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
|
||||
assert_raises(ArgumentError) { Kamal::Configuration.new(@deploy_with_roles.merge(retain_containers: 0)) }
|
||||
end
|
||||
|
||||
test "push_env" do
|
||||
assert_nil @config.push_env
|
||||
assert_equal "all", Kamal::Configuration.new(@deploy.merge(push_env: "all")).push_env
|
||||
assert_equal "clear", Kamal::Configuration.new(@deploy.merge(push_env: "clear")).push_env
|
||||
assert_equal "secret", Kamal::Configuration.new(@deploy.merge(push_env: "secret")).push_env
|
||||
|
||||
assert_raises(ArgumentError) { Kamal::Configuration.new(@deploy_with_roles.merge(push_env: "foo")) }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user