Hi All,
I’m using deploy_revision to checkout git project. After manually deleting
one of the sub folder of the project, and run the recipe again, the deleted
folder hasn’t been recovered.
Recipe: default.rb
deploy_revision “/root/tmp” do
repo ‘https://giturl/test.git’
keep_releases 1
symlink_before_migrate.clear
create_dirs_before_symlink.clear
purge_before_symlink.clear
symlinks.clear
enable_submodules true
shallow_clone true
action :deploy
end
The first run will download the project into /root/tmp/shared/cached-copy
and /root/tmp/releases/ab3606f33b97653bf98f6f7c8c1b76b18b9c3561.
And the project structure:
test1/
a.txt
test2/
b.txt
Now delete the directory /root/tmp/shared/cached-copy/test2, run the recipe
again, the test2 directory won’t be downloaded again.
But in the release folder
/root/tmp/releases/ab3606f33b97653bf98f6f7c8c1b76b18b9c3561 the test2 is
still there. So I delete it as also and run the recipe again.
Finally neither the test2 folder in releases nor in cached-copy has been
recovered no matter how many times the recipe is run.
How can I use this chef resource to get the deleted folder back?
Thanks & Regards
Jason