From e9172d800e5834c0f3678ff9fa8218766d2e5f2e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 12 Mar 2026 18:26:10 +0000 Subject: [PATCH] Add support for common-values script to tile recipe --- cookbooks/tile/recipes/default.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index b170ebd1d..11c149580 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -474,6 +474,28 @@ node[:tile][:styles].each do |name, details| end end + if details[:common_values_script] + postgresql_execute details[:common_values_script] do + action :nothing + command details[:common_values_script] + cluster node[:tile][:database][:cluster] + database "gis" + user "tile" + group "tile" + transaction true + subscribes :run, "git[#{style_directory}]" + end + + Array(details[:common_values_tables]).each do |table| + postgresql_table table do + cluster node[:tile][:database][:cluster] + database "gis" + owner "tile" + permissions "tile" => :all, "www-data" => :select, "_renderd" => :select + end + end + end + execute "#{style_directory}/project.mml" do action :nothing command "carto -a 3.0.22 project.mml > project.xml" -- 2.39.5