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

WIP: Publish App layers metadata #12

Closed
wants to merge 1 commit into from
Closed

Conversation

mike-sul
Copy link
Contributor

Extend the publish tool to include app layers metadata into the app manifest.

@mike-sul mike-sul requested a review from doanac July 11, 2023 10:07
@mike-sul
Copy link
Contributor Author

@doanac This goes together with foundriesio/ci-scripts#285

As a result the app manifest looks like:

{
   "annotations": {
      "compose-app": "v1"
   },
   "config": {
      "digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "mediaType": "application/vnd.oci.image.config.v1+json"
   },
   "layers": [
      {
         "digest": "sha256:1ac07762dcf1149eacd23ee64f64442ca26769033edc76284d3194837422a901",
         "mediaType": "application/octet-stream",
         "size": 587
      },
      {
         "annotations": {
            "layers-meta": "v1"
         },
         "digest": "sha256:3ef0d2568749c8b926928f403688d8dc30efd41bc68fa24718394cf59fa3e8b7",
         "mediaType": "application/octet-stream",
         "size": 3734
      }
   ],
   "manifests": [
      {
         "mediaType": "application/vnd.oci.image.index.v1+json",
         "size": 1629,
         "digest": "sha256:a4e3b4f5be9a91bf75236a7115331faf52d918dbdc94b0bfd2b44a3afa0efae8",
         "platform": {
            "architecture": "amd64",
            "os": ""
         }
      },
      {
         "mediaType": "application/vnd.oci.image.index.v1+json",
         "size": 1787,
         "digest": "sha256:cb5c4ffa7afec43bba8fc192896280076c246a35646fb96ebda798f12c046eb7",
         "platform": {
            "architecture": "arm",
            "os": ""
         }
      },
      {
         "mediaType": "application/vnd.oci.image.index.v1+json",
         "size": 1789,
         "digest": "sha256:709c840b5777f63d809fb87671236a29c410c92198eaa9a5972d264ccd5938d8",
         "platform": {
            "architecture": "arm64",
            "os": ""
         }
      }
   ],
   "mediaType": "application/vnd.oci.image.manifest.v1+json",
   "schemaVersion": 2
}

The layers meta layer/json looks like:

{
  "amd64": {
    "fs_block_size": 4096,
    "layers": {
      "sha256:388169b3a3d311d29d28eeba4fa687b0c18207b040f74b49622e5eca4b765fa6": {
        "size": 0,
        "usage": 28928,
        "archive_size": 120
      },
      ...
    }
  },
  "arm": {
    "fs_block_size": 4096,
    "layers": {
      "sha256:4271bf13258b585def40291fcb3b0490ce089b76fe80a5f1aa672e925ec81bcb": {
        "size": 127,
        "usage": 28962,
        "archive_size": 175
      },
    ...
  },
  "arm64": {
    "fs_block_size": 4096,
    "layers": {
      "sha256:06ade89b14b08b385b7add0a1c420a11d7840018ef39e96da50912076a94b580": {
        "size": 6030081,
        "usage": 7751054,
        "archive_size": 1811031
      },
      ...
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant