git - Chef - Clone a specific tag from GitLab -
i have snippet should clone repo git:
git "somerepo" action :sync destination "/var/" repository "http://#{node["somerepo"][:git_user]}:#{node["somerepo"][:git_pass]}@#{node["somerepo"][:git_host]}/#{node["somerepo"][:git_owner]}/somerepo.git" revision "#{node["somerepo"][:git_revision]}" user "root" group "root" end
i have these several tags in gitlab repo named like: 12022015 01052016 02042016
i want tags/02042016 cloned/checked out how set settings in svn. please help. kinda searched stackoverflow , wish overlooking previous question this. , if not possible, kindly advise so. :) thank you.
as documentation suggests, can supply tag names revision
parameter.
git "apt-cookbook" repository "https://github.com/chef-cookbooks/apt" revision "v2.9.2" action :sync end
as usage of revision
parameter not bullet-proof (not sure, happens, when branch same name exists), can submit complete git refspec tag, refs/tags/<tagname>
:
git "apt-cookbook" repository "https://github.com/chef-cookbooks/apt" revision "refs/tags/v2.9.2" action :sync end
Comments
Post a Comment