rake_tasks: support Puppetfile_extras
In the case of puppet-tripleo, we would like to re-use puppet-openstack_spec_helper/rake_tasks but we have more Puppet modules than Puppet OpenStack, and some of them are third party (not supported by any community). So we would like to create a Puppetfile_extras with the modules specific to TripleO and re-use Puppetfile from Puppet OpenStack. This patch will merge the 2 Puppetfiles if Puppetfile_extras does exist in one Puppet module. Change-Id: I337fb246f326510a3bd459f777dc6a353f9d6924
This commit is contained in:
@@ -61,6 +61,11 @@ task :spec_prep do
|
||||
else
|
||||
sh("git clone https://git.openstack.org/#{repo} #{repo}")
|
||||
end
|
||||
# Allow to a repository to have extra modules that are not
|
||||
# in puppet-openstack-integration
|
||||
if File.exists?("#{Dir.pwd}/Puppetfile_extras")
|
||||
sh("cat #{Dir.pwd}/Puppetfile_extras >> #{repo}/Puppetfile")
|
||||
end
|
||||
script = ['env']
|
||||
script += ["PUPPETFILE_DIR=#{Dir.pwd}/spec/fixtures/modules"]
|
||||
script += ["ZUUL_REF=#{zuul_ref}"]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- If Puppetfile_extras file does exist in a Puppet module, the spec_helper will copy
|
||||
its content to the end of Puppet OpenStack Puppetfile. It will allow external modules
|
||||
(for example puppet-tripleo) to re-use Puppet OpenStack tooling, but adding more modules
|
||||
in the tests.
|
||||
Reference in New Issue
Block a user