I have two recipe check_out_code.rb and deploy.rb and want to sync code from git, and them deploy the code to server if the sync successfully (which means that some code in this git project has been changed).
git node['git_project_directory’] do
notifies :run, "how to call the deploy recipe here?", :immediately
And in deploy.rb the updated file in the git project directory will be deployed to server once a synchronization is performed successfully.
Is it possible? If not maybe we need to define a global variable like:
synced = false
And change it to true if git sync succeeded. Then
if synced then
But this seems not work either in the git resource.
Thanks & Regards
Archive powered by MHonArc 2.6.16.