Skip to content

Commit

Permalink
add decision tree for artifact creation
Browse files Browse the repository at this point in the history
Signed-off-by: Sajay Antony <[email protected]>
  • Loading branch information
sajayantony committed Aug 5, 2023
1 parent c81b3b0 commit 3846364
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/concepts/artifact.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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<br>one file or blob?}
B{Artifact has additional<br>JSON metadata?}
C{Artifact requires <br>different artifactType<br>from config.mediaType?}
D[Specify artifactType,<br>set config and layers<br>to empty descriptors.]
E[Specify artifactType, include<br>artifact in layers, set<br>config to empty descriptor.]
F[Specify config with metadata,<br>include artifact in layers,<br>do not set artifactType.]
G[Specify artifactType to common<br>value, specify config with<br>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],
Expand Down

0 comments on commit 3846364

Please sign in to comment.