Merge "Allow to configure git base URL"

This commit is contained in:
Jenkins
2014-06-03 04:39:53 +00:00
committed by Gerrit Code Review
2 changed files with 10 additions and 5 deletions

View File

@@ -22,6 +22,9 @@
# Most of the work of this script is done in functions so that we may
# easily redirect their stdout / stderr to log files.
GIT_BASE=${GIT_BASE:-https://git.openstack.org}
GIT_BRANCH=${GIT_BRANCH:-master}
source $WORKSPACE/devstack-gate/functions.sh
start_timer
@@ -107,7 +110,7 @@ if [ -z "$SKIP_DEVSTACK_GATE_PROJECT" ]; then
# Since we're early in the script, we need to update the d-g
# copy in the workspace, not $DEST, which is what will be
# updated later.
setup_project openstack-infra/devstack-gate master
setup_project openstack-infra/devstack-gate $GIT_BRANCH
cd $WORKSPACE
re_exec_devstack_gate
@@ -215,7 +218,7 @@ if [ "$DEVSTACK_GATE_GRENADE" -eq "1" ]; then
export GRENADE_NEW_BRANCH="stable/icehouse"
else # master
export GRENADE_OLD_BRANCH="stable/icehouse"
export GRENADE_NEW_BRANCH="master"
export GRENADE_NEW_BRANCH="$GIT_BRANCH"
fi
if [ "$DEVSTACK_GATE_GRENADE_PARTIAL_NCPU" -eq "1" ]; then
export DO_NOT_UPGRADE_SERVICES=[n-cpu]
@@ -230,7 +233,7 @@ elif [ "$DEVSTACK_GATE_GRENADE_FORWARD" -eq "1" ]; then
export GRENADE_NEW_BRANCH="stable/icehouse"
elif [ "$GRENADE_BASE_BRANCH" == "stable/icehouse" ]; then
export GRENADE_OLD_BRANCH="stable/icehouse"
export GRENADE_NEW_BRANCH="master"
export GRENADE_NEW_BRANCH="$GIT_BRANCH"
fi
fi

View File

@@ -131,10 +131,11 @@ function git_remote_set_url {
function git_clone_and_cd {
local project=$1
local short_project=$2
local git_base=${GIT_BASE:-https://git.openstack.org}
if [[ ! -e $short_project ]]; then
echo " Need to clone $short_project"
git clone https://git.openstack.org/$project
git clone $git_base/$project
fi
cd $short_project
}
@@ -208,11 +209,12 @@ function setup_project {
local project=$1
local branch=$2
local short_project=`basename $project`
local git_base=${GIT_BASE:-https://git.openstack.org}
echo "Setting up $project @ $branch"
git_clone_and_cd $project $short_project
git_remote_set_url origin https://git.openstack.org/$project
git_remote_set_url origin $git_base/$project
# allow for possible project branch override
local uc_project=`echo $short_project | tr [:lower:] [:upper:] | tr '-' '_' | sed 's/[^A-Z_]//'`