# remove unused item
data.pop('imagedata')
parm_backend = {}
- for bknd in ['BACKEND_02', 'BACKEND_01']:
- if os.getenv('%s_REGEX' % bknd) and \
- re.search(r'%s' % os.getenv('%s_REGEX' % bknd), data['project']) is not None:
- parm_backend['BACKEND_SELECTION'] = bknd
+ for bknd in list(reversed(range(1,99))):
+ if os.getenv('BACKEND_%02d_REGEX' % bknd) and \
+ re.search(r'%s' % os.getenv('BACKEND_%02d_REGEX' % bknd), data['project']) is not None:
+ parm_backend['BACKEND_SELECTION'] = 'BACKEND_%02d' % bknd
break
trigger_next("post-snapshot", data, extra_params=parm_backend)
# remove unused item
data.pop('imagedata')
parm_backend = {}
- for bknd in ['BACKEND_02', 'BACKEND_01']:
- if os.getenv('%s_REGEX' % bknd) and \
- re.search(r'%s' % os.getenv('%s_REGEX' % bknd), data['project']) is not None:
- parm_backend['BACKEND_SELECTION'] = bknd
+ for bknd in list(reversed(range(1,99))):
+ if os.getenv('BACKEND_%02d_REGEX' % bknd) and \
+ re.search(r'%s' % os.getenv('BACKEND_%02d_REGEX' % bknd), data['project']) is not None:
+ parm_backend['BACKEND_SELECTION'] = 'BACKEND_%02d' % bknd
break
trigger_next("post-snapshot", data, extra_params=parm_backend)
elif action == 'cleanup':
'build_id': trbs.build_id
}
parm_backend = {}
- for bknd in ['BACKEND_02', 'BACKEND_01']:
- if os.getenv('%s_REGEX' % bknd) and \
- re.search(r'%s' % os.getenv('%s_REGEX' % bknd), data['project']) is not None:
- parm_backend['BACKEND_SELECTION'] = bknd
+ for bknd in list(reversed(range(1,99))):
+ if os.getenv('BACKEND_%02d_REGEX' % bknd) and \
+ re.search(r'%s' % os.getenv('BACKEND_%02d_REGEX' % bknd), data['project']) is not None:
+ parm_backend['BACKEND_SELECTION'] = 'BACKEND_%02d' % bknd
break
trigger_next("post-buildlogs", data, extra_params=parm_backend)