Skip to content

Commit 07d8aef

Browse files
committed
Adapt sync jobs to new naming scheme
Change-Id: Ife2e20bd3afa96ce17a0ba29b55b4cef7b7b2641
1 parent a10e27b commit 07d8aef

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

sfrdo/main.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,9 @@ def check_upstream_and_sync(name, workdir, local, branch,
479479
shutil.rmtree(pdir)
480480
try:
481481
with cdir(workdir):
482-
git('clone', 'http://%s/r/%s' % (config.rpmfactory, name),
483-
name)
482+
# git('clone', 'http://%s/r/%s' % (config.rpmfactory, name),
483+
# name)
484+
git('clone', local, name)
484485
with cdir(pdir):
485486
# Set remotes and fetch objects
486487
git('remote', 'add', 'local', local)
@@ -685,6 +686,7 @@ def project_sync_maints(cmdargs, workdir, rdoinfo):
685686
def get_project_status(projects, typ):
686687
r = requests.get('http://%s/r/projects/?d' % config.rpmfactory)
687688
sfprojects = json.loads(r.text[4:])
689+
sfprojects = [os.path.basename(p) for p in sfprojects]
688690

689691
status = {}
690692
for project in projects:
@@ -801,11 +803,16 @@ def refresh_repo_for_project(cmdargs, workdir, rdoinfo, rtype):
801803
push_tags = False
802804

803805
if rtype == 'mirror':
806+
if cmdargs.puppet == True:
807+
local = sfgerrit + 'puppet/' + name
808+
else:
809+
local = sfgerrit + 'openstack/' + name
804810
push_tags = True
805811
branches = ((upstream, 'master', 'master'),
806812
(upstream, 'stable/liberty', 'stable/liberty'),
807813
(upstream, 'stable/mitaka', 'stable/mitaka'))
808814
elif rtype == 'distgit':
815+
local = sfgerrit + 'openstack/' + name
809816
if conf == 'core':
810817
branches = [
811818
(distgit, 'liberty-rdo', 'rdo-liberty'),
@@ -1363,7 +1370,7 @@ def main():
13631370
kargs['rtype'] = 'distgit'
13641371
if kargs['rtype'] == 'mirror' and args.puppet:
13651372
# Use our rdoinfo fork where puppet repo are described
1366-
rdoinfo_fork = 'http://rpmfactory.beta.rdoproject.org/r/rdoinfo'
1373+
rdoinfo_fork = 'http://review.rdoproject.org/r/rdoinfo'
13671374
rdoinfo = rdoinfoutils.fetch_rdoinfo(repo=rdoinfo_fork)
13681375
kargs['rdoinfo'] = rdoinfo
13691376
final_status = {}

0 commit comments

Comments
 (0)