Skip to content

Task skopeo-copy's images-url workspace should be optional #1360

@bparry02

Description

@bparry02

skopeo-copy can operate on a single pair of source and destination images, or a list of images passed via the images-url workspace. The images-url workspace should not be required when only one image should be copied via the srcImageURL and destImageURL parameters.

In task/skopeo-copy/0.4/skopeo-copy.yaml, the workspaces definition should be modified to make the images-url workspace optional:

  workspaces:
    - name: images-url
      optional: true

Expected Behavior

TaskRun succeeds without specifying the unused images-url workspace.

Actual Behavior

[User error] declared workspace "images-url" is required but has not been bound

Steps to Reproduce the Problem

  1. Ensure the skopeo-copy task is available
  2. Apply the following TaskRun:
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: skopeo-copy-taskrun
spec:
  params:
    - name: srcImageURL
      value: 'docker://registry.access.redhat.com/ubi9/ubi:9.7'
    - name: destImageURL
      value: 'docker://myregistry.acme.com/ubi9/ubi:9.7'
  taskRef:
    kind: Task
    name: skopeo-copy

Additional Info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions