Vagrant to use local branch for devstack

By default devstack was cloning master when setting up devstack.
This change has the devstack plugin clone the local working branch so
that uncommitted changes can be tested.

Change-Id: If963ea1d703cd9d4d96665e75db08834cf473b33
This commit is contained in:
David C Kennedy 2016-06-20 10:02:47 +01:00
parent 72f240b926
commit 633aff4279
1 changed files with 13 additions and 0 deletions

View File

@ -15,6 +15,19 @@ git config --global user.name "Local devstack committer"
git add --all
git commit -m "Local commit"
CURRENT_BRANCH=`git status | grep 'On branch' | sed 's/On branch //'`
if [ ${CURRENT_BRANCH} != 'master' ]
then
echo Maintaining current branch ${CURRENT_BRANCH}
# set the branch to what we're using in local.conf
sed -i "s/enable_plugin monasca-transform \/home\/vagrant\/monasca-transform//g" /home/vagrant/devstack/local.conf
sed -i "s/# END DEVSTACK LOCAL.CONF CONTENTS//g" /home/vagrant/devstack/local.conf
printf "enable_plugin monasca-transform /home/vagrant/monasca-transform ${CURRENT_BRANCH}\n" >> /home/vagrant/devstack/local.conf
printf "# END DEVSTACK LOCAL.CONF CONTENTS" >> /home/vagrant/devstack/local.conf
fi
cd ../monasca-api
git add --all