wip
This commit is contained in:
@@ -12,7 +12,8 @@ class Base:
|
||||
async def clean_build(self, script):
|
||||
await script.umounts()
|
||||
await script.umount()
|
||||
proc = await script.exec('buildah', 'rm', script.ctr, raises=False)
|
||||
if script.ctr:
|
||||
proc = await script.exec('buildah', 'rm', script.ctr, raises=False)
|
||||
|
||||
def __repr__(self):
|
||||
return f'Base({self.base})'
|
||||
|
||||
@@ -20,20 +20,24 @@ class Commit:
|
||||
self.repo = repo
|
||||
self.registry = registry or 'localhost'
|
||||
self.push = push or os.getenv('CI')
|
||||
self.tags = tags or []
|
||||
|
||||
# figure out registry host
|
||||
if '/' in self.repo and not registry:
|
||||
first = self.repo.split('/')[0]
|
||||
if '.' in first or ':' in first:
|
||||
self.registry = self.repo.split('/')[0]
|
||||
self.repo = '/'.join(self.repo.split('/')[1:])
|
||||
|
||||
if ':' in self.repo and not tags:
|
||||
self.tags = [self.repo.split(':')[1]]
|
||||
self.repo = self.repo.split(':')[0]
|
||||
|
||||
# docker.io currently has issues with oci format
|
||||
self.format = format or 'oci'
|
||||
if self.registry == 'docker.io':
|
||||
self.format = 'docker'
|
||||
|
||||
self.tags = tags or []
|
||||
|
||||
# figure tags from CI vars
|
||||
if not self.tags:
|
||||
for name in CI_VARS:
|
||||
|
||||
Reference in New Issue
Block a user