Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Deploying app from a subdirectory? #67

Open
julien51 opened this issue Feb 6, 2018 · 1 comment
Open

Deploying app from a subdirectory? #67

julien51 opened this issue Feb 6, 2018 · 1 comment

Comments

@julien51
Copy link

julien51 commented Feb 6, 2018

Hello,
Our app is not at the "root" of the code repository, is there a way to handle that with this cookbook?
Currently our application is deployed with

application 'app' do

  path _path
  owner _owner
  group _group
  deploy_key _pkey
  rollback_on_error true

  # repository "[email protected]:code/full.git"
  # revision "master"

  symlinks 'log' => 'log', 'node_modules' => 'node_modules'

  # packages %w( git )
  action :deploy
end

But the code we'd like to deploy is not at the root of github.com:code/full but rather inside a subdirectory called app.

Is there a way to tell this cookbook to only take the content of the subdirectory and put it in path ?

@coderanger
Copy link
Member

Your current code corresponds to a very old version of this cookbook which is no longer supported. The current incarnation broke things up into smaller pieces, so that would be a question for the resource you use to copy down your code. The git resource does not normally support that as git itself does not support cloning a subfolder like that. Alternatively most application subresources take a path option so you could clone the whole repo and then run all the deploy task resources against the subfolder. Or you could make your own subclass (or whatever) of the git resource that does support retrieving a subfolder (probably clone to somewhere else and then symlink or copy the subfolder into the requested path).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants