From e98f519fb9ecf44a0b8d8fdd78b05c298d0f7593 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 28 Aug 2014 15:39:36 -0700 Subject: [PATCH] Update git puppet modules properly. When using git sourced puppet modules we need to specify the desired ref as a tag, sha1, or remote branch because install_modules.sh does not reset local branches to match remote branches. Do a git remote update instaed of a git fetch to make sure that all remotes are updated. Change-Id: I1785af6fd02e6cda8f5f62b54bdb83efb47b7197 --- install_modules.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index 6f687a243b..25789d075f 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -56,8 +56,10 @@ MODULES["puppetlabs-puppetdb"]="3.0.1" MODULES["stankevich-python"]="1.6.6" MODULES["puppetlabs-rabbitmq"]="4.0.0" +# Source modules should use tags, explicit refs or remote branches because +# we do not update local branches in this script. SOURCE_MODULES["https://github.com/nibalizer/puppet-module-puppetboard"]="2.4.0" -SOURCE_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="master" +SOURCE_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="origin/master" MODULE_LIST=`puppet module list` @@ -109,7 +111,7 @@ for MOD in ${!SOURCE_MODULES[*]} ; do fi fi # fetch the latest refs from the repo - $GIT_CMD_BASE fetch + $GIT_CMD_BASE remote update # make sure the correct revision is installed, I have to use rev-list b/c rev-parse does not work with tags if [ `${GIT_CMD_BASE} rev-list HEAD --max-count=1` != `${GIT_CMD_BASE} rev-list ${SOURCE_MODULES[$MOD]} --max-count=1` ]; then # checkout correct revision