voxpupuli/beaker

Support installing modules from git branches

Closed this issue · 4 comments

This issue is a continuation/redirection of this Puppetlabs Jira ticket.

The two use-cases described on that Jira ticket (here and here) seem best solved by a Beaker helper to install modules from git branches.

Of the two uses-cases linked above, I'll re-describe mine here, as I'm most familiar with it. I need the camptocamp-archive mod on the VMs provisioned and tested by Beaker, so I do something like this in spec/spec_helper_acceptance.rb:

    hosts.each do |host|
      on host, puppet('module', 'install', 'camptocamp-archive'), { :acceptable_exit_codes => [0] }
    end

I'd like to be able to install my fork of camptocamp-archive from GitHub for pre-PR testing. Something like this:

    hosts.each do |host|
      on host, puppet_mod_git_install('camptocamp-archive', 'https://github.com/dfarrell07/puppet-archive', 'origin/master'), { :acceptable_exit_codes => [0] }
    end

Note that the syntax I made up in that last block is just a quick example, not a suggestion for actual final syntax.

I'm mostly trying to get the discussion started with this issue, and move it to the right project. Thoughts?

Instead of origin/master you could just do the branch name assuming we could assume that the remote is always called 'origin' ( just to keep things simpler )
Beyond that i like the idea!

Looking at a vagrant-opendaylight Fedora 20 Puppet RPM VM, manually checking facter, I see the expected relevant values:

Totally reasonable. Could also split origin and master into two params, both of which default to those values.

Beyond that i like the idea!

Huzzah! :)