-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: stop downloading artifact into a temporary location
this commit changes the oci downloader in some aspects: - stops downloading the artifact into a temporary location. - does not fail if multiple artifacts are present. - allow users to specify the artifact they desire to download. - if multiple artifacts are present and no artifact name is provided downloads the first one. this commit also adds a test to verify the new behavior. Signed-off-by: Ricardo Maraschini <[email protected]>
- Loading branch information
1 parent
f87788d
commit 77470f5
Showing
5 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
manifest: | | ||
{ | ||
"schemaVersion": 2, | ||
"mediaType": "application/vnd.oci.image.manifest.v1+json", | ||
"artifactType": "application/vnd.unknown.artifact.v1", | ||
"config": { | ||
"mediaType": "application/vnd.oci.empty.v1+json", | ||
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", | ||
"size": 2 | ||
}, | ||
"layers": [ | ||
{ | ||
"mediaType": "application/vnd.oci.image.layer.v1.tar", | ||
"digest": "sha256:c147efcfc2d7ea666a9e4f5187b115c90903f0fc896a56df9a6ef5d8f3fc9f31", | ||
"size": 5, | ||
"annotations": { | ||
"org.opencontainers.image.title": "file1" | ||
} | ||
}, | ||
{ | ||
"mediaType": "application/vnd.oci.image.layer.v1.tar", | ||
"digest": "sha256:3377870dfeaaa7adf79a374d2702a3fdb13e5e5ea0dd8aa95a802ad39044a92f", | ||
"size": 5, | ||
"annotations": { | ||
"org.opencontainers.image.title": "file2" | ||
} | ||
}, | ||
{ | ||
"mediaType": "application/vnd.oci.image.layer.v1.tar", | ||
"digest": "sha256:6f3fef6dc51c7996a74992b70d0c35f328ed909a5e07646cf0bab3383c95bb02", | ||
"size": 5, | ||
"annotations": { | ||
"org.opencontainers.image.title": "file3" | ||
} | ||
} | ||
], | ||
"annotations": { | ||
"org.opencontainers.image.created": "2024-10-03T14:32:57Z" | ||
} | ||
} | ||
artifacts: | ||
44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a: "{}" | ||
c147efcfc2d7ea666a9e4f5187b115c90903f0fc896a56df9a6ef5d8f3fc9f31: "file1" | ||
6f3fef6dc51c7996a74992b70d0c35f328ed909a5e07646cf0bab3383c95bb02: "file3" | ||
artifactName: file3 | ||
expected: file3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters