Source modules.env from apply-test.sh

This causes apply-test.sh to get the list of puppet modules to do
integration test with from modules.env. Modules.env has been
refactored to have three lists of modules: Package modules(MODULES),
SOURCE_MODULES, and INTEGRATION_MODULES.

When PUPPET_INTEGRATION_TEST is not set, INTEGRATION_MODULES is
folded into SOURCE_MODULES.

In apply-test.sh, INTEGRATION_MODULES is sourced from modules.env
and some string/array manipulation is performed to pass each entry
to zuul-cloner.

Change-Id: I47302c5c7e8c41b985f16a05c4e9b8078ea867a3
This commit is contained in:
Spencer Krum 2014-11-15 18:05:39 +00:00
parent 0833068ac2
commit ed46e9303f
3 changed files with 37 additions and 7 deletions

View File

@ -34,6 +34,11 @@ declare -A MODULES
# key:value is source location, revision to checkout
declare -A SOURCE_MODULES
# Array of modues to be installed from source and without dependency resolution from openstack git
# key:value is source location, revision to checkout
declare -A INTEGRATION_MODULES
#NOTE: if we previously installed kickstandproject-ntp we nuke it here
# since puppetlabs-ntp and kickstandproject-ntp install to the same dir
if grep kickstandproject-ntp /etc/puppet/modules/ntp/Modulefile &> /dev/null; then

View File

@ -54,10 +54,16 @@ MODULES["puppetlabs-rabbitmq"]="4.0.0"
# we do not update local branches in this script.
SOURCE_MODULES["https://github.com/puppet-community/puppet-module-puppetboard"]="2.4.0"
# Add modules that should be part of the openstack-infra integration test here
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="origin/master"
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-kibana"]="origin/master"
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-jenkins"]="origin/master"
if [[ "$PUPPET_INTEGRATION_TEST" -ne "1" ]]; then
SOURCE_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="origin/master"
SOURCE_MODULES["https://git.openstack.org/openstack-infra/puppet-kibana"]="origin/master"
SOURCE_MODULES["https://git.openstack.org/openstack-infra/puppet-jenkins"]="origin/master"
# If puppet integration tests are not being run, merge SOURCE and INTEGRATION modules
for MOD in ${!INTEGRATION_MODULES[*]}; do
SOURCE_MODULES[$MOD]=${INTEGRATION_MODULES[$MOD]}
done
fi

View File

@ -27,13 +27,32 @@ clonemap:
dest: '/etc/puppet/modules/\2'
EOF
# Add puppet modules that should be installed to the end of this list
# These arrays are initialized here and populated in modules.env
# Array of modules to be installed key:value is module:version.
declare -A MODULES
# Array of modues to be installed from source and without dependency resolution.
# key:value is source location, revision to checkout
declare -A SOURCE_MODULES
# Array of modues to be installed from source and without dependency resolution from openstack git
# key:value is source location, revision to checkout
declare -A INTEGRATION_MODULES
project_names=""
source modules.env
for MOD in ${!INTEGRATION_MODULES[*]}; do
project_scope=$(basename `dirname $MOD`)
repo_name=`basename $MOD`
project_names+=" $project_scope/$repo_name"
done
sudo -E /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/puppet-storyboard \
openstack-infra/project-config \
openstack-infra/puppet-jenkins \
openstack-infra/puppet-kibana
$project_names
if [[ ! -d applytest ]] ; then