Skip to content

Add download plugin to the ocm cli #570

@Skarlso

Description

@Skarlso

Description

We should be able to provide a command that lets the user download plugins from a component version. For example, consider the following component descriptor:

name: ocm.software/plugins/oci
provider:
  name: ocm.software
resources:
  - extraIdentity:
      architecture: amd64
      os: linux
    input:
      path: oci/ociplugin.linux-amd64
      type: file
    name: oci
    type: ocmPlugin
    version: 0.0.1
  - extraIdentity:
      architecture: amd64
      os: darwin
    input:
      path: oci/ociplugin.darwin-amd64
      type: file
    name: oci
    type: ocmPlugin
    version: 0.0.1
version: 0.0.1

A command like this should be able to fetch the right resource:

ocm download plugin ghcr.io/open-component-model/ocm//ocm.software/plugins/oci:0.0.1 --resource-name oci --output ./tmp/oci-plugin --extra-identity os=linux,architecture=amd64

It should also be backwards compatible with other download commands. For example existing ECR demo plugin from ocm repo should be able to download:

ocm download plugin ghcr.io/open-component-model/ocm//ocm.software/plugins/ecrplugin:0.27.0 --resource-name demo --output ./tmp/ecrplugin --extra-identity os=linux,architecture=amd64

Done Criteria

  • Able to download multiple arch plugin
  • Able to choose a default if no identity is provided
  • Should work with authentication
  • Code has been reviewed by other team members
  • Analysis of existing tests (Unit and Integration)
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated (includes deletion of existing unnecessary Integration Test and/or creation of new ones if required)
  • Enduser Documentation updated (if applicable)
  • Internal technical Documentation created/updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Assignees

Labels

area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

Type

No fields configured for Task.

Projects

Status
🍺 Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions