feat: oci artifact cli#1684
Merged
matthiasbruns merged 60 commits intoFeb 13, 2026
Merged
Conversation
jakobmoellerdev
requested changes
Jan 30, 2026
2d37161 to
5c78ef7
Compare
d221d85 to
cfb7597
Compare
fabianburth
requested changes
Feb 3, 2026
fabianburth
reviewed
Feb 3, 2026
fabianburth
reviewed
Feb 3, 2026
fabianburth
reviewed
Feb 3, 2026
80c8e7f to
4f1169f
Compare
fabianburth
previously approved these changes
Feb 3, 2026
4f1169f to
06cc998
Compare
fabianburth
previously approved these changes
Feb 3, 2026
jakobmoellerdev
left a comment
Member
There was a problem hiding this comment.
generally LGTM, nice stuff. just minor questions and clarifications for testing and usage
d099a74 to
1736fee
Compare
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> # Conflicts: # cli/go.mod # cli/go.sum # cli/integration/go.mod # cli/integration/go.sum
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> # Conflicts: # cli/go.mod # cli/go.sum # cli/integration/go.sum
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
59a2a43 to
6e28caf
Compare
piotrjanik
reviewed
Feb 13, 2026
piotrjanik
reviewed
Feb 13, 2026
piotrjanik
approved these changes
Feb 13, 2026
jakobmoellerdev
approved these changes
Feb 13, 2026
matthiasbruns
added a commit
that referenced
this pull request
Feb 13, 2026
#### What this PR does / why we need it This PR is the result of a discussion on another PR #1684 (comment) We want a reusable `IsLocalBlob` helper that is currently being rewritten multiple times. #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#875 Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
2 tasks
morri-son
pushed a commit
to morri-son/open-component-model
that referenced
this pull request
Feb 16, 2026
<!-- markdownlint-disable MD041 --> #### What this PR does / why we need it This PR ties all the changes related to open-component-model/ocm-project#796 together in the cli package and implement oci transfer with tests. It also adds two new flags, which were taken from old ocm https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/ - `FlagCopyResources = "copy-resources"` in addition, I've added an integration test, that: - creates two oci registries - uploads one artifact to the first registry - creates a cv pointing to the artifact - calls: ```go transferCMD.SetArgs([]string{ "transfer", "component-version", sourceRef, targetRef, "--config", cfgPath, "--copy-resources", // required, otherwise we wouldn't transfer oci artifacts }) ``` - verifies, that the oci artifact is in the 2nd registry #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#796 Split PRs: - open-component-model#1730 - open-component-model#1751 - open-component-model#1736 - open-component-model#1727 - open-component-model#1718 - open-component-model#1717 --------- Signed-off-by: Matthias Bruns <git@matthiasbruns.com> Signed-off-by: Matthias Bruns <github@matthiasbruns.com> Signed-off-by: Fabian Burth <fabian.burth@sap.com> Co-authored-by: Fabian Burth <fabian.burth@sap.com>
morri-son
pushed a commit
to morri-son/open-component-model
that referenced
this pull request
Feb 16, 2026
…ent-model#1772) #### What this PR does / why we need it This PR is the result of a discussion on another PR open-component-model#1684 (comment) We want a reusable `IsLocalBlob` helper that is currently being rewritten multiple times. #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#875 Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
morri-son
pushed a commit
to morri-son/open-component-model
that referenced
this pull request
Feb 18, 2026
…l#1751) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Required plugin contract update for Resources to be able to upload resources. It also implements `repository.ResourceRepository` in `ResourceRegistry`. Additionally, the tests used a deprecated blob construction and was updated to use the new prefered way old: `blob.NewDirectReadOnlyBlob` new: `inmemory.New` Part of open-component-model#1684 This PR aligns the plugin resource contract with the updated `repository.ResourceRepository` ```go // Repository defines the interface for storing and retrieving OCM resources // independently of component versions from a Store Implementation type Repository interface { // GetResourceCredentialConsumerIdentity resolves the identity of the given [descriptor.Resource] to use for credential resolution. GetResourceCredentialConsumerIdentity(ctx context.Context, resource *descriptor.Resource) (runtime.Identity, error) // UploadResource uploads a [descriptor.Resource] to the repository. // Returns the updated resource with repository-specific information. // The resource must be referenced in the component descriptor. // The credentials map must contain necessary authentication information to access the resource. UploadResource(ctx context.Context, res *descriptor.Resource, content blob.ReadOnlyBlob, credentials map[string]string) (*descriptor.Resource, error) // DownloadResource downloads and verifies the integrity of a [descriptor.Resource] from the repository. DownloadResource(ctx context.Context, res *descriptor.Resource, credentials map[string]string) (blob.ReadOnlyBlob, error) } ``` #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#796 --------- Signed-off-by: Matthias Bruns <git@matthiasbruns.com> Signed-off-by: Matthias Bruns <github@matthiasbruns.com> Co-authored-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
morri-son
pushed a commit
to morri-son/open-component-model
that referenced
this pull request
Feb 18, 2026
<!-- markdownlint-disable MD041 --> #### What this PR does / why we need it This PR ties all the changes related to open-component-model/ocm-project#796 together in the cli package and implement oci transfer with tests. It also adds two new flags, which were taken from old ocm https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/ - `FlagCopyResources = "copy-resources"` in addition, I've added an integration test, that: - creates two oci registries - uploads one artifact to the first registry - creates a cv pointing to the artifact - calls: ```go transferCMD.SetArgs([]string{ "transfer", "component-version", sourceRef, targetRef, "--config", cfgPath, "--copy-resources", // required, otherwise we wouldn't transfer oci artifacts }) ``` - verifies, that the oci artifact is in the 2nd registry #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#796 Split PRs: - open-component-model#1730 - open-component-model#1751 - open-component-model#1736 - open-component-model#1727 - open-component-model#1718 - open-component-model#1717 --------- Signed-off-by: Matthias Bruns <git@matthiasbruns.com> Signed-off-by: Matthias Bruns <github@matthiasbruns.com> Signed-off-by: Fabian Burth <fabian.burth@sap.com> Co-authored-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
morri-son
pushed a commit
to morri-son/open-component-model
that referenced
this pull request
Feb 18, 2026
…ent-model#1772) #### What this PR does / why we need it This PR is the result of a discussion on another PR open-component-model#1684 (comment) We want a reusable `IsLocalBlob` helper that is currently being rewritten multiple times. #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#875 Signed-off-by: Matthias Bruns <git@matthiasbruns.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
This PR ties all the changes related to open-component-model/ocm-project#796 together in the cli package and implement oci transfer with tests.
It also adds two new flags, which were taken from old ocm https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/
FlagCopyResources = "copy-resources"in addition, I've added an integration test, that:
Which issue(s) this PR fixes
Contributes: open-component-model/ocm-project#796
Split PRs: