copy_logs.sh: add support for Puppet4 modulepath

modulepath is different on puppet4, so let's detect which path to use
when listing all modules in copy_logs.sh, so we can get all OpenStack
configurations at the end of puppet4 jobs.

Change-Id: I32f0f1e4117062ad6eb76e5d480e5e1fd2d02713
This commit is contained in:
Emilien Macchi 2016-08-15 16:09:06 -04:00
parent da748ad437
commit 440fd09ad6

View File

@ -34,7 +34,15 @@ mkdir $WORKSPACE/logs
#
# For right now, we populate our projects with a guess from those that
# have puppet modules installed. revisit this if needs change
for project in /etc/puppet/modules/*; do
if [ -d /etc/puppetlabs/code ]; then
# puppet4
PUPPET_MODULES_PATH='/etc/puppetlabs/code/modules'
else
# puppet3
PUPPET_MODULES_PATH='/etc/puppet/modules'
fi
for project in $PUPPET_MODULES_PATH/*; do
# find Puppet OpenStack modules
if [ -f $project/metadata.json ]; then
if egrep -q "github.com/(stackforge|openstack)/puppet" $project/metadata.json; then