Skip to content

feat(796): oci artifact spec#1730

Merged
matthiasbruns merged 17 commits into
open-component-model:mainfrom
matthiasbruns:feat/796_oci_artifact_transform_oci_bindings_spec
Feb 10, 2026
Merged

feat(796): oci artifact spec#1730
matthiasbruns merged 17 commits into
open-component-model:mainfrom
matthiasbruns:feat/796_oci_artifact_transform_oci_bindings_spec

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

First PR to add oci artifact transformers in the bindings lib.
Part of #1684

GetOCIArtifactSpec will download a artifact and put it into a file defined by OutputPath or into tmp when OutputPath is empty.
The next step is to integrate the spec into the cli transfer component-version.

type GetOCIArtifactSpec struct {
	// Resource is the resource descriptor to get the OCI artifact from.
	Resource *v2.Resource `json:"resource"`
	// OutputPath is the path where the artifact should be downloaded to..
	// If empty, a temporary file will be created.
	OutputPath string `json:"outputPath,omitempty"`
}

Which issue(s) this PR fixes

Contributes: open-component-model/ocm-project#796

@matthiasbruns matthiasbruns requested a review from a team as a code owner February 5, 2026 16:47
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/l Large labels Feb 5, 2026
@matthiasbruns matthiasbruns force-pushed the feat/796_oci_artifact_transform_oci_bindings_spec branch from 9e49bde to a4cde09 Compare February 5, 2026 16:48
fabianburth
fabianburth previously approved these changes Feb 6, 2026
Comment thread bindings/go/oci/transformer/get_oci_artifact.go Outdated
piotrjanik
piotrjanik previously approved these changes Feb 6, 2026

@jakobmoellerdev jakobmoellerdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly lgtm, just smaller corrections and questions I believe

Comment thread bindings/go/oci/integration/go.mod
Comment thread bindings/go/oci/spec/transformation/v1alpha1/get_oci_artifact.go
Comment thread bindings/go/oci/transformer/get_oci_artifact.go Outdated
Comment thread bindings/go/oci/transformer/get_oci_artifact.go Outdated
Comment thread bindings/go/oci/integration/integration_test.go Outdated
Comment thread bindings/go/oci/integration/integration_test.go Outdated
Comment thread bindings/go/oci/integration/integration_test.go Outdated
@matthiasbruns matthiasbruns force-pushed the feat/796_oci_artifact_transform_oci_bindings_spec branch from d7941cb to b898d7f Compare February 9, 2026 08:28
matthiasbruns added a commit that referenced this pull request Feb 9, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

This PR is based on the discussion on
#1730 (comment)

It implements the `Resolver` interface and provides a static way to
resolve `credentials`.
This `Resolver` does not use the graph. If you have an idea on how to
integrate static credentials into the dag, I am happy to change the
implementation.

#### Which issue(s) this PR fixes
Contributes:
open-component-model/ocm-project#796

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/796_oci_artifact_transform_oci_bindings_spec branch 2 times, most recently from 7d22f79 to 70e74bf Compare February 9, 2026 12:14
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>

# Conflicts:
#	bindings/go/oci/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>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>

# Conflicts:
#	bindings/go/oci/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>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/796_oci_artifact_transform_oci_bindings_spec branch from 70e74bf to da3270e Compare February 9, 2026 14:41
Comment thread bindings/go/oci/transformer/output.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Comment thread bindings/go/oci/spec/transformation/v1alpha1/get_oci_artifact.go Outdated
Comment thread bindings/go/oci/go.mod Outdated
Comment thread bindings/go/oci/transformer/get_oci_artifact_test.go
Comment thread bindings/go/oci/transformer/get_oci_artifact_test.go Outdated
Comment thread bindings/go/oci/transformer/get_oci_artifact_test.go
matthiasbruns and others added 5 commits February 9, 2026 16:10
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>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Matthias Bruns <github@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>
fabianburth
fabianburth previously approved these changes Feb 9, 2026
@matthiasbruns matthiasbruns enabled auto-merge (squash) February 9, 2026 16:03

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally okay, just a few little questions. :)

Comment thread bindings/go/oci/transformer/get_oci_artifact.go
Comment thread bindings/go/oci/transformer/output.go
Comment thread bindings/go/oci/transformer/get_oci_artifact.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns merged commit 2b87daf into open-component-model:main Feb 10, 2026
19 checks passed
matthiasbruns added a commit that referenced this pull request Feb 13, 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:
- #1730
- #1751
- #1736
- #1727
- #1718
- #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
<!-- 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 18, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants