src = profile = fields['SRC_PROJECT']
target = fields['DEST_PROJECT']
replace_gerrit_url = fields['REPLACE_GERRIT_URL']
- immport_rpm = fields['IMPORT_RPM']
+ importrpm = fields['IMPORT_RPM']
build_src = build
print "src = %s , target = %s" %(src, target)
print "\n********"
print " 7) Sync Done..."
- self.update_build_flag_project(build, target, flag=True)
- print "\n********"
- print " 8) Update build flag=default..."
-
- if importrpm is not None and importrpm == True:
+ if importrpm is not None and importrpm == "True":
# importrpm trigger next
- fields['profile'] = profile
- fields['target'] = target
- trigger_next("REF_IMPORT_RPM_OBS", fields)
+ data={}
+ data['profile'] = profile
+ data['target'] = target
+ data['repo_path'] = os.path.join(fields['REPO_PATH'],
+ fields['BUILDID'])
+ data['build_id'] = fields['BUILDID']
+ trigger_next("REF_IMPORT_RPM_OBS", data)
print " 9) trigger_next import rpm .."
+ else:
+ self.update_build_flag_project(build, target, flag=True)
+ print "\n********"
+ print " 8) Update build flag=default..."
if errpackages:
return 1
'DEST_PROJECT': os.getenv('DEST_PROJECT'),
'REPLACE_GERRIT_URL': os.getenv('REPLACE_GERRIT_URL'),
'IMPORT_RPM': os.getenv('IMPORT_RPM'),
+ 'REPO_PATH': os.getenv('REPO_PATH'),
+ 'BUILDID': os.getenv('BUILDID'),
}
else:
fields = trigger_info(os.getenv('TRIGGER_INFO'))
fields = trigger_info(os.getenv("TRIGGER_INFO"))
# Check if we've got required fieldsdk-rootstraps in TRIGGER_INFO
- for field in ('profile', 'target', 'project', 'build_id', 'repo_path'):
+ for field in ('profile', 'target', 'build_id', 'repo_path'):
if field not in fields:
print 'Error: TRIGGER_INFO doesn\'t contain %s' % field
return -1
self.profile = self.setup_profile(fields['profile'], fields['target'])
if not self.profile:
- print 'Skip Sync OBS project %s' % fields['project']
+ print 'Skip Sync OBS project %s' % fields['target']
return 0
buildid = fields['build_id'].split('_')[1]