Same Rakefile in multiple cookbook git repos

Hi,
I’m following the single cookbook per git repo pattern. I use a Rakefile
to run tasks for style, unit test, integration tests(local vm/docker or
cloud). I noticed I’ve got the same Rakefile in many repos now. If I want
to make a change to the Rakefile I’m going to be changing/pushing in many
git repos. I’d like to have a single ‘master’ Rakefile that each git repo
can reference. Anyone else solved this?

Some ideas I had after searching around the internets are:

  • keep Rakefile in its own git repo

THEN

OR

  • pull Rakefile from artifact repo(nexus, artifactory, etc). It is pushed
    to artifact repo whenever changes are made in rake.repo

Thanks.
-Maciej

capture those common rake tasks in a library, make a gem, use it in your
rakefiles.

On Thu, Sep 24, 2015 at 11:05 AM, loafy junk loafjunk@loafdog.org wrote:

Hi,
I’m following the single cookbook per git repo pattern. I use a Rakefile
to run tasks for style, unit test, integration tests(local vm/docker or
cloud). I noticed I’ve got the same Rakefile in many repos now. If I want
to make a change to the Rakefile I’m going to be changing/pushing in many
git repos. I’d like to have a single ‘master’ Rakefile that each git repo
can reference. Anyone else solved this?

Some ideas I had after searching around the internets are:

  • keep Rakefile in its own git repo

THEN

OR

  • pull Rakefile from artifact repo(nexus, artifactory, etc). It is pushed
    to artifact repo whenever changes are made in rake.repo

Thanks.
-Maciej

Or put it in a generator cookbook template for when you 'chef generate
cookbook’
Am 24.09.2015 8:30 nachm. schrieb “Ranjib Dey” dey.ranjib@gmail.com:

capture those common rake tasks in a library, make a gem, use it in your
rakefiles.

On Thu, Sep 24, 2015 at 11:05 AM, loafy junk loafjunk@loafdog.org wrote:

Hi,
I’m following the single cookbook per git repo pattern. I use a Rakefile
to run tasks for style, unit test, integration tests(local vm/docker or
cloud). I noticed I’ve got the same Rakefile in many repos now. If I want
to make a change to the Rakefile I’m going to be changing/pushing in many
git repos. I’d like to have a single ‘master’ Rakefile that each git repo
can reference. Anyone else solved this?

Some ideas I had after searching around the internets are:

  • keep Rakefile in its own git repo

THEN

OR

  • pull Rakefile from artifact repo(nexus, artifactory, etc). It is pushed
    to artifact repo whenever changes are made in rake.repo

Thanks.
-Maciej

Rake thankfully has a global option. Place your Rakefile under ~/.rake

put that under version control and you’re good to go.

If you want to standardise it across multiple workstation installs you
could use something like
https://supermarket.chef.io/cookbooks/chefdk_bootstrap or create your own
workstation bootstrap to place all the files on disk. So if you have
multiple file files then you can deploy/git clone them in one fell swoop.

hope that helps!
Dan

On Thu, 24 Sep 2015 at 21:45 Torben Knerr mail@tknerr.de wrote:

Or put it in a generator cookbook template for when you 'chef generate
cookbook’
Am 24.09.2015 8:30 nachm. schrieb “Ranjib Dey” dey.ranjib@gmail.com:

capture those common rake tasks in a library, make a gem, use it in your
rakefiles.

On Thu, Sep 24, 2015 at 11:05 AM, loafy junk loafjunk@loafdog.org
wrote:

Hi,
I’m following the single cookbook per git repo pattern. I use a
Rakefile to run tasks for style, unit test, integration tests(local
vm/docker or cloud). I noticed I’ve got the same Rakefile in many repos
now. If I want to make a change to the Rakefile I’m going to be
changing/pushing in many git repos. I’d like to have a single 'master’
Rakefile that each git repo can reference. Anyone else solved this?

Some ideas I had after searching around the internets are:

  • keep Rakefile in its own git repo

THEN

OR

  • pull Rakefile from artifact repo(nexus, artifactory, etc). It is
    pushed to artifact repo whenever changes are made in rake.repo

Thanks.
-Maciej