Support depends-on for Neutron CI test
As Neutron CI test node can't access zuul-merger server; it depends on fetching changes from https://review.openstack.org/p. So we need specially fetch those depends-on changes in a customer way. Before we setup a zuul-merger server which is reachable from the Neutron CI test node, this can be a short term solution to support depends-on changes. Change-Id: I67c7a2bbd93870208c4f4121da8ec8835575011d
This commit is contained in:
parent
00f931eb7b
commit
b4c1abc056
26
run_tests.sh
26
run_tests.sh
@ -252,6 +252,32 @@ EOF
|
||||
fi
|
||||
)
|
||||
|
||||
(
|
||||
# fetch depends-on patches.
|
||||
if [ "${ZUUL_URL}" = "https://review.openstack.org/p" -a -n "$ZUUL_CHANGES" ]; then
|
||||
# Neutron test nodes still depend on review.openstack.org to fetch changes.
|
||||
# Need fetch depends-on patches specially.
|
||||
changes=$(echo $ZUUL_CHANGES | tr '^' ' ')
|
||||
echo "Processing depends-on changes: $changes"
|
||||
for change in $changes; do
|
||||
project=$(echo $change | cut -d: -f1);
|
||||
# skip the changes belong to $ZUUL_PROJECT which
|
||||
# has been done already the primary routine.
|
||||
if [ "$project" = "$ZUUL_PROJECT" ]; then
|
||||
echo -e "\tSkip the change: $change"
|
||||
else
|
||||
echo -e "\tFetching change: $change."
|
||||
ref=$(echo $change | cut -d: -f3);
|
||||
pushd $BASE/new/$(basename $project)
|
||||
if git fetch $ZUUL_URL/$project $ref; then
|
||||
git merge FETCH_HEAD
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
done
|
||||
fi
|
||||
)
|
||||
|
||||
# delete folders to save disk space
|
||||
sudo rm -rf /opt/git
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user