Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Refactor of the publish path and HttpTransport #162

Merged
merged 1 commit into from
Jan 30, 2025
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
23 changes: 23 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ test-case = "3.3.1"
tokio = { version = "1.43.0", features = ["test-util"]}
bytes = "1.9.0"
reqwest = { version = "0.12.12", default-features = false, features = ["stream"] }
pretty_assertions = "1.4.1"
14 changes: 13 additions & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Packages published through PyOCI use the `application/pyoci.package.v1` [artifac
The image index gets tagged with the package version.
This allows multiple build artifacts to be published to the same package version.

`com.pyoci.sha256_digest` is added as an annotation in the `ImageIndex.manifests[]`
containing the digest of the package blob.
This is so we don't need to pull the manifest itself to get the digest of the package.

```json
{
"schemaVersion": 2,
Expand All @@ -22,7 +26,8 @@ This allows multiple build artifacts to be published to the same package version
"os": "any"
},
"annotations": {
"org.opencontainers.image.created":"2024-11-20T20:23:36Z"
"org.opencontainers.image.created":"2024-11-20T20:23:36Z",
"com.pyoci.sha256_digest": "b7513fb69106a855b69153582dec476677b3c79f4a13cfee6fb7a356cfa754c0"
}
}
],
Expand All @@ -34,6 +39,11 @@ This allows multiple build artifacts to be published to the same package version

## Image Manifest

When a package is published with `PyOci :: Label :: <key> :: <value>` classifiers,
the key/value pair will be added to the ImageManifest annotations.

'org.opencontainers.image.created' will always be added.

```json
{
"schemaVersion": 2,
Expand All @@ -52,6 +62,8 @@ This allows multiple build artifacts to be published to the same package version
}
],
"annotations": {
"org.opencontainers.image.description": "Published using PyOCI as part of the examples.",
"org.opencontainers.image.url": "https://github.com/allexveldman/pyoci",
"org.opencontainers.image.created":"2024-11-20T20:23:36Z"
}
}
Expand Down
Loading