gocd/rabbit-openqa.py: Ignore isos which don't have an OpenQAMapping
Every medium to be tested needs to include a staging specific part which OpenQAMapping specifies. If this does not match we better not use it as it might find some unrelated tests.
This commit is contained in:
parent
d483a448b0
commit
d83a3a6b2f
@ -48,10 +48,16 @@ class Project(object):
|
||||
new = parts[2]
|
||||
new = new.replace('$LETTER', self.staging_letter(staging_project))
|
||||
try:
|
||||
return re.compile(old).sub(new, iso)
|
||||
stagingiso = re.compile(old).sub(new, iso)
|
||||
except re.error:
|
||||
self.logger.error(f"_MAP_ISO {self.replace_string} does not create valid regexps in {self.name}")
|
||||
return iso
|
||||
return None
|
||||
|
||||
if stagingiso == iso:
|
||||
self.logger.info(f"{self.replace_string} did not map {iso} properly, ignoring")
|
||||
return None
|
||||
|
||||
return stagingiso
|
||||
|
||||
def gather_isos(self, name, repository):
|
||||
url = self.api.makeurl(['published', name, repository, 'iso'])
|
||||
@ -61,6 +67,10 @@ class Project(object):
|
||||
for entry in root.findall('entry'):
|
||||
if entry.get('name').endswith('iso'):
|
||||
ret.append(self.map_iso(name, entry.get('name')))
|
||||
|
||||
# Filter out isos which couldn't be mapped
|
||||
ret = [iso for iso in ret if iso]
|
||||
|
||||
return ret
|
||||
|
||||
def gather_buildid(self, name, repository):
|
||||
|
Loading…
x
Reference in New Issue
Block a user