Closed PhilippeKhalife closed 6 years ago
Given tile.yml:
packages:
The generated spec for deploy-all seems correct:
consumes:
The generated "templates/deploy-all.sh.erb" and "templates/opsmgr.env.erb" however are using the "type" instead of "name" and this does not get processed correctly.
<% if_link('svc') do |link| %> <% hosts = link.instances.map { |instance| instance.address } %> export SVC_HOST="<%= link.instances[0].address %>" export SVC_HOSTS=<%= Shellwords.escape(hosts.to_json) %> export SVC_PROPERTIES=<%= Shellwords.escape(link.properties.to_json) %> <% end %>
I tested a manual change to the templates, and this works correctly:
<% if_link('svc_newname') do |link| %> <% hosts = link.instances.map { |instance| instance.address } %> export SVC_NEWNAME_HOST="<%= link.instances[0].address %>" export SVC_NEWNAME_HOSTS=<%= Shellwords.escape(hosts.to_json) %> export SVC_NEWNAME_PROPERTIES=<%= Shellwords.escape(link.properties.to_json) %> <% end %>
Fixing this is a requirement to fix issue #219.
This is now fixed with pull request submitted.
Given tile.yml:
packages:
The generated spec for deploy-all seems correct:
consumes:
The generated "templates/deploy-all.sh.erb" and "templates/opsmgr.env.erb" however are using the "type" instead of "name" and this does not get processed correctly.
<% if_link('svc') do |link| %> <% hosts = link.instances.map { |instance| instance.address } %> export SVC_HOST="<%= link.instances[0].address %>" export SVC_HOSTS=<%= Shellwords.escape(hosts.to_json) %> export SVC_PROPERTIES=<%= Shellwords.escape(link.properties.to_json) %> <% end %>
I tested a manual change to the templates, and this works correctly:
<% if_link('svc_newname') do |link| %> <% hosts = link.instances.map { |instance| instance.address } %> export SVC_NEWNAME_HOST="<%= link.instances[0].address %>" export SVC_NEWNAME_HOSTS=<%= Shellwords.escape(hosts.to_json) %> export SVC_NEWNAME_PROPERTIES=<%= Shellwords.escape(link.properties.to_json) %> <% end %>