- From: Jeff Byrnes <
>
- To:
- Subject: [chef] Re: git branch questions
- Date: Fri, 11 Apr 2014 11:02:49 -0400
Jenn:
You’ll actually want to use something like this:
git '/opt/test' do
repository 'git://github.com/Production/test.git'
revision 'production'
action :sync
user 'test'
end
or this:
git '/opt/test' do
repository 'git://github.com/Production/test.git'
checkout_branch 'production'
action :sync
user 'test'
end
There’s no branch attribute, so you’re ending up with the default value for the checkout_branch attribute, which is deploy .
See the docs for the git resource’s attributes for more details.
On April 11, 2014 at 10:54:22 AM, Jenn Fountain (
">
) wrote: Ohai,
I am using the following to check out code:
git '/opt/test' do
repository 'git://github.com/Production/test.git'
branch 'production'
action :sync
user ‘test'
end
this results in this:
test]# git branch
* deploy
staging
this command:
git clone -b production git://github.com/Production/test.git test2
test2]# git branch
* production
This is causing concern because the devs aren’t 100% sure if this the production branch or not. Is this normal? Did I miss something? Am I doing something wrong? I tried checkout_branch and get this:
undefined method `checkout_branch' for Chef::Resource::Git
Any help would be appreciated.
|
Archive powered by MHonArc 2.6.16.