Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-6675

Buildah Cluster Task does not work with docker-registry secrets

XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      The buildah cluster task fails with below error when using docker-registry secrets:

      + test -f /workspace/dockerconfig/config.json
      + test -f /workspace/dockerconfig/.dockerconfigjson
      + cp /workspace/dockerconfig/.dockerconfigjson /tmp/.docker/config.json
      cp: cannot create regular file '/tmp/.docker/config.json': No such file or directory 

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      Create a docker-registry secret:

      $ oc create secret docker-registry --docker-server=a --docker-username=b --docker-password=c

       Reference the task and secret as below in the Pipeline:

      - name: build-test-image
          taskRef:
            name: buildah
            kind: ClusterTask
          workspaces:
          - name: source
            workspace: shared-workspace
          - name: dockerconfig
            workspace: dockerconfig-ws <---------
          params:
          - name: IMAGE
            value: myregistry.com/foo/bar
         ...
         ..

        The cluster task fails with below error if the secret is not associated with a service account attached with the Pipelinerun or Taskrun.

      + test -f /workspace/dockerconfig/config.json
      + test -f /workspace/dockerconfig/.dockerconfigjson
      + cp /workspace/dockerconfig/.dockerconfigjson /tmp/.docker/config.json
      cp: cannot create regular file '/tmp/.docker/config.json': No such file or directory 

       

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

              sashture Savita .
              rhn-support-jyarora Jyotsana Arora
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: