Dev set up
This commit is contained in:
4
ops/cookbooks/app/recipes/ci.rb
Normal file
4
ops/cookbooks/app/recipes/ci.rb
Normal file
@ -0,0 +1,4 @@
|
||||
template "#{node['php']['working-dir']}/application/config/database.php" do
|
||||
source 'ci/database.php.erb'
|
||||
mode '0755'
|
||||
end
|
8
ops/cookbooks/app/recipes/mysql_seed.rb
Normal file
8
ops/cookbooks/app/recipes/mysql_seed.rb
Normal file
@ -0,0 +1,8 @@
|
||||
cookbook_file '/tmp/datacom_abc.sql' do
|
||||
source 'datacom_abc.sql'
|
||||
end
|
||||
|
||||
execute 'Seed MySQL DB' do
|
||||
command "mysql -h localhost -u\"#{node['db']['user']}\" -p\"#{node['db']['password']}\" \"#{node['db']['name']}\" < /tmp/datacom_abc.sql"
|
||||
not_if "$(mysql -h 127.0.0.1 -uroot -p\"#{node['db']['root_password']}\" \"#{node['db']['name']}\" -sse \"select count(*) from test_dec;\") -gt 0"
|
||||
end
|
Reference in New Issue
Block a user