Git support to knife cookbook upload


#1

Hiya,

I was wondering if you guys are willing to add something this to knife
cookbook upload:

knife cookbook upload git://github.com/rubiojr/yum-stress-cookbook.git

This will basically clone the repo to the cookbook path and upload it
to the Chef Server, an operation I’ve been doing to much lately :slight_smile:

I’ve created a topic branch for this:

https://github.com/rubiojr/chef/tree/cook-upload-git-support

The downside is that git is added as a dependency. Needs better input
validation and error handling probably, just waiting to see if you
guys find something like this useful and nobody is (hopefully) working
on this right now.

Cheers.


#2

Hiya,

I was wondering if you guys are willing to add something this to knife
cookbook upload:

knife cookbook upload git://github.com/rubiojr/yum-stress-cookbook.git

This will basically clone the repo to the cookbook path and upload it
to the Chef Server, an operation I’ve been doing to much lately :slight_smile:

I’ve created a topic branch for this:

https://github.com/rubiojr/chef/tree/cook-upload-git-support

The downside is that git is added as a dependency. Needs better input
validation and error handling probably, just waiting to see if you
guys find something like this useful and nobody is (hopefully) working
on this right now.

Cheers.

If you build something like this, pls be aware of that uploading the head version of a git repository is just a special case. You would need a knife syntax where you can specify one or many git versions (maybe specified through git tags) that get checked out and then be uploaded!


Dennis


#3

On Tue, Aug 9, 2011 at 3:25 PM, Dennis Klein d.klein@gsi.de wrote:

If you build something like this, pls be aware of that uploading the head version of a git repository is just a special case. You would need a knife syntax where you can specify one or many git versions (maybe specified through git tags) that get checked out and then be uploaded!

Sure.

What about keeping it simple for ‘knife cookbook upload’ (i.e. cloning
master) and creating a more complex ‘knife cookbook git’ command?


Dennis


#4

On Tue, Aug 9, 2011 at 3:40 PM, Sergio Rubio rubiojr@frameos.org wrote:

On Tue, Aug 9, 2011 at 3:25 PM, Dennis Klein d.klein@gsi.de wrote:

If you build something like this, pls be aware of that uploading the head version of a git repository is just a special case. You would need a knife syntax where you can specify one or many git versions (maybe specified through git tags) that get checked out and then be uploaded!

Sure.

What about keeping it simple for ‘knife cookbook upload’ (i.e. cloning
master) and creating a more complex ‘knife cookbook git’ command?

I’m moving the experimental stuff to knife-playground:


Dennis