ttm: fix leap 15 docker image handling
need to refactor a bit and force setting a snapshot number for the docker image. counters are different due to different source containers.
This commit is contained in:
parent
e96a27ad7f
commit
6455aff69a
@ -121,7 +121,7 @@ class ToTestBase(object):
|
|||||||
if not base:
|
if not base:
|
||||||
base = self.project_base
|
base = self.project_base
|
||||||
for binary in self.binaries_of_product(project, tree):
|
for binary in self.binaries_of_product(project, tree):
|
||||||
result = re.match(r'%s.*Build(.*)-Media(.*).iso' % base, binary)
|
result = re.match(r'.*-Build([0-9.]+)(?:-Media.*\.iso|\.docker\.tar\.xz)', binary)
|
||||||
if result:
|
if result:
|
||||||
return result.group(1)
|
return result.group(1)
|
||||||
raise NotFoundException("can't find %s iso version" % project)
|
raise NotFoundException("can't find %s iso version" % project)
|
||||||
@ -352,7 +352,11 @@ class ToTestBase(object):
|
|||||||
if re.match(r'.*-ftp-(ftp|POOL)-', package):
|
if re.match(r'.*-ftp-(ftp|POOL)-', package):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if ':%s-Addon-NonOss-ftp-ftp' % self.base in package:
|
# docker container has no size limit
|
||||||
|
if package == 'opensuse-leap-image':
|
||||||
|
return None
|
||||||
|
|
||||||
|
if '-Addon-NonOss-ftp-ftp' in package:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
raise Exception('No maxsize for {}'.format(package))
|
raise Exception('No maxsize for {}'.format(package))
|
||||||
@ -553,6 +557,12 @@ class ToTestBase(object):
|
|||||||
|
|
||||||
class ToTestBaseNew(ToTestBase):
|
class ToTestBaseNew(ToTestBase):
|
||||||
|
|
||||||
|
# whether all medias need to have the same build number
|
||||||
|
need_same_build_number = True
|
||||||
|
|
||||||
|
# whether to set a snapshot number on release
|
||||||
|
set_snapshot_number = False
|
||||||
|
|
||||||
"""Base class for new product builder"""
|
"""Base class for new product builder"""
|
||||||
def _release(self, set_release=None):
|
def _release(self, set_release=None):
|
||||||
query = {'cmd': 'release'}
|
query = {'cmd': 'release'}
|
||||||
@ -594,7 +604,7 @@ class ToTestBaseNew(ToTestBase):
|
|||||||
|
|
||||||
def is_snapshottable(self):
|
def is_snapshottable(self):
|
||||||
ret = super(ToTestBaseNew, self).is_snapshottable()
|
ret = super(ToTestBaseNew, self).is_snapshottable()
|
||||||
if ret:
|
if ret and self.need_same_build_number:
|
||||||
# make sure all medias have the same build number
|
# make sure all medias have the same build number
|
||||||
builds = set()
|
builds = set()
|
||||||
for p in self.ftp_products:
|
for p in self.ftp_products:
|
||||||
@ -612,8 +622,10 @@ class ToTestBaseNew(ToTestBase):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def update_totest(self, snapshot):
|
def update_totest(self, snapshot):
|
||||||
|
if not self.set_snapshot_number:
|
||||||
|
snapshot = None
|
||||||
# omit snapshot, we don't want to rename on release
|
# omit snapshot, we don't want to rename on release
|
||||||
super(ToTestBaseNew, self).update_totest()
|
super(ToTestBaseNew, self).update_totest(snapshot)
|
||||||
|
|
||||||
|
|
||||||
class ToTestFactory(ToTestBase):
|
class ToTestFactory(ToTestBase):
|
||||||
@ -764,6 +776,10 @@ class ToTest150Images(ToTestBaseNew):
|
|||||||
livecd_products = []
|
livecd_products = []
|
||||||
product_arch = 'x86_64'
|
product_arch = 'x86_64'
|
||||||
|
|
||||||
|
# docker image has a different number
|
||||||
|
need_same_build_number = False
|
||||||
|
set_snapshot_number = True
|
||||||
|
|
||||||
def openqa_group(self):
|
def openqa_group(self):
|
||||||
return 'openSUSE Leap 15.0 Images'
|
return 'openSUSE Leap 15.0 Images'
|
||||||
|
|
||||||
@ -782,6 +798,7 @@ class ToTest150Images(ToTestBaseNew):
|
|||||||
def jobs_num(self):
|
def jobs_num(self):
|
||||||
return 13
|
return 13
|
||||||
|
|
||||||
|
|
||||||
class ToTestSLE150(ToTestBaseNew):
|
class ToTestSLE150(ToTestBaseNew):
|
||||||
main_products = [
|
main_products = [
|
||||||
'000product:SLES-cd-DVD-aarch64',
|
'000product:SLES-cd-DVD-aarch64',
|
||||||
@ -881,7 +898,6 @@ class CommandlineInterface(cmdln.Cmdln):
|
|||||||
if not self.options.obs_api_url:
|
if not self.options.obs_api_url:
|
||||||
self.options.obs_api_url = self.api_url[self.options.project_base]
|
self.options.obs_api_url = self.api_url[self.options.project_base]
|
||||||
|
|
||||||
|
|
||||||
def _setup_totest(self, project):
|
def _setup_totest(self, project):
|
||||||
fallback_project = 'openSUSE:%s' % project
|
fallback_project = 'openSUSE:%s' % project
|
||||||
if project not in self.totest_class and fallback_project in self.totest_class:
|
if project not in self.totest_class and fallback_project in self.totest_class:
|
||||||
@ -951,4 +967,3 @@ class CommandlineInterface(cmdln.Cmdln):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = CommandlineInterface()
|
app = CommandlineInterface()
|
||||||
sys.exit(app.main())
|
sys.exit(app.main())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user