diff --git a/docs/concepts/artifact.mdx b/docs/concepts/artifact.mdx index e503a2bf..f51050e0 100644 --- a/docs/concepts/artifact.mdx +++ b/docs/concepts/artifact.mdx @@ -162,6 +162,30 @@ as per the [empty descriptors guidance][empty-descriptor]. } ``` +### Deciding on artifactType or config.mediaType + +Considering the above types of artifacts the decision tree below should help +determine what fields to set when creating an artifact. + +```mermaid +graph TD + A{Artifact has at least
one file or blob?} + B{Artifact has additional
JSON metadata?} + C{Artifact requires
different artifactType
from config.mediaType?} + D[Specify artifactType,
set config and layers
to empty descriptors.] + E[Specify artifactType, include
artifact in layers, set
config to empty descriptor.] + F[Specify config with metadata,
include artifact in layers,
do not set artifactType.] + G[Specify artifactType to common
value, specify config with
metadata, include artifact in layers.] + + A -- No --> D + A -- Yes --> B + B -- No --> E + B -- Yes --> C + C -- No --> F + C -- Yes --> G + +``` + ### Harnessing Image Indexes One of the key advantages of OCI artifacts is their ability to utilize [Image Indexes][image-index],