1
votes

I'm currently using chef to deploy a server on opsworks and then using a 'deploy' recipe, deploy an app from a private repo.

Everything works as expected, in that my repo is cloned correctly. Although it clones my directory I end up with a number of subdirectories e.g

  • current
  • release

What I'd like to do is just get the master branch not in a subfolder, so I am in essence getting the root of my web app from git.

my current chef code looks like

deploy '/var/www/html' do
  repo 'myrepo.git'
  git_ssh_wrapper "/git-ssh-wrapper" # For private Git repos 
  deploy_to '/var/www/html'
  symlink_before_migrate.clear
  create_dirs_before_symlink.clear
  purge_before_symlink.clear
  symlinks.clear
  action :deploy
end

I'm not sure if either the 'action' is incorrect above, or should I be using 'deploy_revision' instead of deploy here?

Thanks

1
How did you solve the problem? Was it a sparse checkout and a shallow clone that you needed? Looks like the git resource of chef doesn't give everything we need to solve that case. - Daniel

1 Answers

0
votes

Use a git resource instead of a deploy resource.