Files
deb-networking-cisco/tools/add_neutron_patches.sh
Henry Gessau 36b10b2baf Stop doing any magic cloning of neutron during CI
With https://review.openstack.org/185739 merged to neutron we can no
longer have neutron in requirements.txt

Adopting the solution developed by Doug Wiegley for LBaaS:
c61f920f2a54fd829ee37484b3743ab77b909847

Update how the tools/add_neutron_patches.sh script is invoked.

Change-Id: I0df48369bdc9de22be51af4e7c4ea9ce4255cd2a
2015-07-01 23:52:11 +00:00

37 lines
856 B
Bash
Executable File

#!/bin/sh
echo "Adding neutron patches into the testing env"
NEUTRON_SRC="$1"
LIST_SRC="$2/test-patches.txt"
echo "Checking Directory Existence: $NEUTRON_SRC"
if [ ! -d "$NEUTRON_SRC" ]; then
echo "Directory $NEUTRON_SRC does not exist, aborting..."
exit 1
fi
cd $NEUTRON_SRC
# Ensure we're on toxBranch not master or other branches
git checkout -b toxBranch 2> /dev/null
git checkout toxBranch 2> /dev/null
# Fetch and rebase patches into neutron src
while read p; do
git fetch https://review.openstack.org/openstack/neutron $p
git checkout FETCH_HEAD
git rebase master
git rebase HEAD toxBranch
if [ -d "$2/.git/rebase-merge" ]; then
echo "Patch $p in confict and can not be added..."
git rebase --abort
fi
done <$LIST_SRC
# Ensure we're up to date with master even after rebases
git checkout toxBranch
git rebase master