Added zulu builds

This commit is contained in:
Michael Chen 2022-11-15 10:16:13 +01:00
parent 2933571ec4
commit b5b84c6dbd
Signed by: cnml
GPG Key ID: 5845BF3F82D5F629

View File

@ -161,7 +161,8 @@ def docker_buildx(repository: str, tags: list[str], build_platforms: list[Docker
if process.returncode != 0: if process.returncode != 0:
output = process.stdout.decode('utf-8') output = process.stdout.decode('utf-8')
print(output) print(output)
error = "\n".join(line for line in process.stderr.decode('utf-8').splitlines() if 'ERROR' in line) error = "\n".join(line for line in process.stderr.decode(
'utf-8').splitlines() if 'ERROR' in line)
raise Exception(error) raise Exception(error)
@ -216,7 +217,13 @@ def build_version(manifest: VersionManifest, version_id: str, repository: str =
temurin_platforms: list[DockerPlatforms] = [ temurin_platforms: list[DockerPlatforms] = [
"linux/arm64", "linux/arm/v7", "linux/amd64", "linux/ppc64le"] "linux/arm64", "linux/arm/v7", "linux/amd64", "linux/ppc64le"]
docker_buildx( docker_buildx(
repository, [version["id"], f"{version['id']}-temurin"], temurin_platforms, build_args=build_args) repository, [f"{version['id']}-temurin"], temurin_platforms, build_args=build_args)
print("# Build Zulu images")
build_args["DOCKER_IMAGE"] = f"azul/zulu-openjdk:{java_version['majorVersion']}-jre"
zulu_platforms: list[DockerPlatforms] = ["linux/arm64", "linux/amd64"]
docker_buildx(
repository, [version["id"], f"{version['id']}-zulu"], zulu_platforms, build_args=build_args)
if __name__ == "__main__": if __name__ == "__main__":