Compare commits
1 Commits
master
...
remove-whi
Author | SHA1 | Date | |
---|---|---|---|
d4d68fd1c6 |
30
build.py
30
build.py
@ -244,7 +244,7 @@ class Tags:
|
||||
tags.append("latest")
|
||||
else:
|
||||
tags = self._tags[image.canonical_name][branch].copy()
|
||||
|
||||
|
||||
return tags
|
||||
|
||||
|
||||
@ -529,7 +529,7 @@ class DockerBuilder:
|
||||
|
||||
logger.debug("run: %s", pre_cmd + cmd)
|
||||
subprocess.run(pre_cmd + cmd, *args, **kwargs)
|
||||
|
||||
|
||||
def run_with_result(self, cmd):
|
||||
return subprocess.run(cmd, stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||
|
||||
@ -771,18 +771,18 @@ class DockerBuilder:
|
||||
f"--platform={platforms}",
|
||||
".",
|
||||
]
|
||||
|
||||
|
||||
if image.annotations != None:
|
||||
build_cmd = [
|
||||
"podman",
|
||||
"build",
|
||||
"--rm",
|
||||
"--force-rm",
|
||||
f"--manifest={manifest}",
|
||||
build_cmd = [
|
||||
"podman",
|
||||
"build",
|
||||
"--rm",
|
||||
"--force-rm",
|
||||
f"--manifest={manifest}",
|
||||
f"--platform={platforms}"
|
||||
]
|
||||
for akey, avalue in image.annotations.items():
|
||||
build_cmd.append(
|
||||
for akey, avalue in image.annotations.items():
|
||||
build_cmd.append(
|
||||
f"--annotation={akey}={avalue}")
|
||||
|
||||
d = datetime.now()
|
||||
@ -793,20 +793,20 @@ class DockerBuilder:
|
||||
build_cmd.append(f"--annotation=org.opencontainers.image.version={ver}")
|
||||
|
||||
build_cmd.append(".")
|
||||
|
||||
|
||||
if PKG_VERSIONS is not None and image.canonical_name in PKG_VERSIONS:
|
||||
build_cmd.insert(
|
||||
-1, f"--build-arg=PKG_VERSION={PKG_VERSIONS[image.canonical_name]}"
|
||||
)
|
||||
|
||||
self.run(build_cmd, cwd=image.path)
|
||||
|
||||
|
||||
for tag in tags[1:]:
|
||||
other_manifest = self.render_full_tag(image, tag)
|
||||
tag_cmd = ["podman", "tag", manifest, other_manifest]
|
||||
self.run(tag_cmd)
|
||||
|
||||
|
||||
|
||||
|
||||
def podman_push(self, image: Image, sign=None):
|
||||
if self.images_info.skip_branch(image.canonical_name, self.branch):
|
||||
return
|
||||
|
Reference in New Issue
Block a user