diff --git a/install_modules.sh b/install_modules.sh index 66288095c3..e1452ff656 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -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 diff --git a/modules.env b/modules.env index fc3a971324..3f5739243a 100644 --- a/modules.env +++ b/modules.env @@ -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 diff --git a/tools/apply-test.sh b/tools/apply-test.sh index 7296a3dce1..1c14358284 100755 --- a/tools/apply-test.sh +++ b/tools/apply-test.sh @@ -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