Merge "Allow choice of GIT protocol used."
This commit is contained in:
commit
97ba12b8a4
@ -19,6 +19,7 @@
|
|||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
from common import run_local
|
from common import run_local
|
||||||
@ -27,9 +28,16 @@ URL = ('https://git.openstack.org/cgit/openstack-infra/config/plain/'
|
|||||||
'modules/openstack_project/files/review.projects.yaml')
|
'modules/openstack_project/files/review.projects.yaml')
|
||||||
PROJECT_RE = re.compile('^-?\s+project:\s+(.*)$')
|
PROJECT_RE = re.compile('^-?\s+project:\s+(.*)$')
|
||||||
|
|
||||||
|
# Not using an arg libraries in order to avoid module imports that
|
||||||
|
# are not available across all python versions
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
GIT_BASE = sys.argv[1]
|
||||||
|
else:
|
||||||
|
GIT_BASE = 'git://git.openstack.org'
|
||||||
|
|
||||||
|
|
||||||
def clone_repo(project):
|
def clone_repo(project):
|
||||||
remote = 'git://git.openstack.org/%s.git' % project
|
remote = '%s/%s.git' % (GIT_BASE, project)
|
||||||
|
|
||||||
# Clear out any existing target directory first, in case of a retry.
|
# Clear out any existing target directory first, in case of a retry.
|
||||||
try:
|
try:
|
||||||
|
@ -22,6 +22,7 @@ THIN=$3
|
|||||||
PYTHON3=${4:-false}
|
PYTHON3=${4:-false}
|
||||||
PYPY=${5:-false}
|
PYPY=${5:-false}
|
||||||
ALL_MYSQL_PRIVS=${6:-false}
|
ALL_MYSQL_PRIVS=${6:-false}
|
||||||
|
GIT_BASE=${7:-git://git.openstack.org}
|
||||||
|
|
||||||
# Save the nameservers configured by our provider.
|
# Save the nameservers configured by our provider.
|
||||||
cat >/tmp/forwarding.conf <<EOF
|
cat >/tmp/forwarding.conf <<EOF
|
||||||
@ -42,7 +43,8 @@ if [ -f /usr/bin/yum ]; then
|
|||||||
fi
|
fi
|
||||||
wget https://git.openstack.org/cgit/openstack-infra/config/plain/install_puppet.sh
|
wget https://git.openstack.org/cgit/openstack-infra/config/plain/install_puppet.sh
|
||||||
sudo bash -xe install_puppet.sh
|
sudo bash -xe install_puppet.sh
|
||||||
sudo git clone --depth=1 git://git.openstack.org/openstack-infra/config.git \
|
|
||||||
|
sudo git clone --depth=1 $GIT_BASE/openstack-infra/config.git \
|
||||||
/root/config
|
/root/config
|
||||||
sudo /bin/bash /root/config/install_modules.sh
|
sudo /bin/bash /root/config/install_modules.sh
|
||||||
if [ -z "$NODEPOOL_SSH_KEY" ] ; then
|
if [ -z "$NODEPOOL_SSH_KEY" ] ; then
|
||||||
@ -91,7 +93,7 @@ dig git.openstack.org
|
|||||||
|
|
||||||
# Cache all currently known gerrit repos.
|
# Cache all currently known gerrit repos.
|
||||||
sudo mkdir -p /opt/git
|
sudo mkdir -p /opt/git
|
||||||
sudo -i python /opt/nodepool-scripts/cache_git_repos.py
|
sudo -i python /opt/nodepool-scripts/cache_git_repos.py $GIT_BASE
|
||||||
|
|
||||||
# We don't always get ext4 from our clouds, mount ext3 as ext4 on the next
|
# We don't always get ext4 from our clouds, mount ext3 as ext4 on the next
|
||||||
# boot (eg when this image is used for testing).
|
# boot (eg when this image is used for testing).
|
||||||
|
Loading…
Reference in New Issue
Block a user