return True
+def make_prefix_trigger_file(target_project):
+ iso_list = os.getenv('ISOLATE_SNAPSHOT', None)
+ if iso_list is None:
+ return ''
+ for x in iso_list.split(','):
+ _prj, _prefix = x.split('=')
+ if _prj == target_project:
+ return _prefix.upper()
+ return ''
+
def main(obs_event_fields):
"""The main body"""
if(isReadyForPrerelease(build, project)):
print 'All the repositories are published for project %s.' \
'Triggering the prerelease.' % (project)
+ target_project_name = ''
try:
target_project_name = get_info_from_prerelease_name(project)[0]
buildmonitor_db.connect_db()
except Exception as err:
buildmonitor_db.disconnect_db()
print repr(err)
- trigger_next('#PRERELEASE#%s#%s' %(project,event_type),obs_event_fields)
+ trigger_next('%s#PRERELEASE#%s#%s' \
+ % (make_prefix_trigger_file(target_project_name), project, event_type), \
+ obs_event_fields)
elif(is_trbs_project(project)):
if(isReadyForTrbs(build, project)):
print 'All the repositories are published for project %s.' \
if(isReadyForCreateSnapshot(build, backenddb, project)):
print 'All the repositories are published for project %s.' \
'Triggering the creating snapshot job..'%(project)
- trigger_next('#SNAP#%s#%s' %(project,event_type),obs_event_fields)
+ trigger_next('%s#SNAP#%s#%s' \
+ % (make_prefix_trigger_file(project), project, event_type), \
+ obs_event_fields)
else:
trigger_next('#%s#%s' %(project,obs_event_fields['event_type']),
obs_event_fields)