This commit is contained in:
jpic
2020-02-13 05:42:04 +01:00
parent 6e8b2ec2a7
commit 4366ee63f9
14 changed files with 90 additions and 190 deletions
+2 -1
View File
@@ -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})'
+6 -2
View File
@@ -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: