Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/scripts/infra_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,9 @@ def _publish(missing: str) -> int:
continue
if code != 1:
return 1
# No --annotation: buildx refuses annotations on a Docker list; each platform build carries the same --labels.
created = _tried_again(lambda: _streamed([
"docker", "buildx", "imagetools", "create", "-t", ref,
"--annotation", f"index:org.opencontainers.image.source=https://github.com/{os.environ['GITHUB_REPOSITORY']}",
"--annotation", f"index:org.opencontainers.image.revision={os.environ['GITHUB_SHA']}",
f"{ref}-amd64", f"{ref}-arm64"]))
"docker", "buildx", "imagetools", "create", "-t", ref, f"{ref}-amd64", f"{ref}-arm64"]))
if created.returncode:
return created.returncode
return 0
Expand Down
4 changes: 1 addition & 3 deletions tst/unit/test_infra_build_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ def test_publish_tags_each_new_images_platform_builds_as_one_and_leaves_a_publis
assert _run(script, monkeypatch, "publish", json.dumps([json.loads(_gateway()), json.loads(_disk())])) == 0

assert calls[0] == ["docker", "login", "ghcr.io", "--username", "bot", "--password-stdin"]
assert runs == [["docker", "buildx", "imagetools", "create", "-t", new,
"--annotation", "index:org.opencontainers.image.source=https://github.com/scaleapi/agentenv-framework",
"--annotation", "index:org.opencontainers.image.revision=c0ffee", f"{new}-amd64", f"{new}-arm64"]]
assert runs == [["docker", "buildx", "imagetools", "create", "-t", new, f"{new}-amd64", f"{new}-arm64"]]
assert f"{published} is published already, so it's left as it is" in capsys.readouterr().out


Expand Down
Loading