Skip to content

Commit

Permalink
ci: fix typo in docker script generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniini committed Jun 21, 2024
1 parent ddd765c commit 8956a37
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions hack/ci/generate-docker-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def read_metadata(path) -> dict[str, str]:
if build["flavor"] != DEFAULT_FLAVOR:
root += "-%s" % build["flavor"]

command = [
build_command = [
"docker",
"buildx",
"build",
Expand All @@ -74,7 +74,7 @@ def read_metadata(path) -> dict[str, str]:
]

for platform in platforms:
command += ["--platform", platform]
build_command += ["--platform", platform]

tags = [root]
for tag in build["tags"]:
Expand All @@ -87,9 +87,9 @@ def read_metadata(path) -> dict[str, str]:

tags.sort()
for tag in tags:
command += ["--tag", tag]
build_command += ["--tag", tag]

command += [
build_command += [
"-f",
"hack/ci/kernel.dockerfile",
"--build-arg",
Expand All @@ -102,5 +102,18 @@ def read_metadata(path) -> dict[str, str]:
"dev.edera.kernel.flavor=%s" % build["flavor"],
sys.argv[1],
]
command = list(shlex.quote(item) for item in command)
print(" ".join(command))
build_command = list(shlex.quote(item) for item in build_command)
print(" ".join(build_command))

base_signing_command = [
"cosign",
"sign",
"--yes",
]

for tag in tags:
signing_command = base_signing_command + [
'%s@$(cat kernel-image-id-%s-%s)' % (tag, build["version"], build["flavor"]),
]
signing_command = list(shlex.quote(item) for item in signing_command)
print(" ".join(signing_command))

0 comments on commit 8956a37

Please sign in to comment.