Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployConfigsLoaded doesn't resolve config references #9

Closed
qwe2 opened this issue Jul 19, 2017 · 1 comment
Closed

deployConfigsLoaded doesn't resolve config references #9

qwe2 opened this issue Jul 19, 2017 · 1 comment

Comments

@qwe2
Copy link
Contributor

qwe2 commented Jul 19, 2017

Say I have a deploy config like this:

servers = [
  {
    name = "server_0"
    host = ${app.host}
  }
]

app.host = test-host

then calling deploySsh server_0 will result in com.typesafe.config.ConfigException$NotResolved exception because the config is only parsed but not resolved. This feature would be useful for example in CI jobs where I want to put parts of the deploy config into environment variables.

Currently this could be worked around by defining deployConfigsLoaded instead of deployResourceConfigFiles (or any other alternatives of that). The fix is pretty easy: call .resolve() in the deployConfigsLoaded TaskKey definition.

I'm using it like this currently:

deployConfigsLoaded := Seq(ConfigFactory.parseFile(file("ssh-deploy.conf")).resolve())
qwe2 added a commit to qwe2/sbt-deploy-ssh that referenced this issue Jul 19, 2017
@shmishleniy
Copy link
Owner

Thanks for improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants