openshift / pipelines-tutorial

A step-by-step tutorial showing OpenShift Pipelines
Apache License 2.0
299 stars 631 forks source link

openshift-client (kind:Task) creation failed #21

Closed rutvik23 closed 5 years ago

rutvik23 commented 5 years ago

While creating an openshift-client task, it failed with the message:

[core@master-0 ~]$ curl -O https://raw.githubusercontent.com/tektoncd/catalog/master/openshift-client/openshift-client-task.yaml
[core@master-0 ~]$ oc create -f openshift-client-task.yaml 
Error from server (InternalError): error when creating "openshift-client-task.yaml": Internal error occurred: admission webhook "webhook.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: cannot unmarshal array into Go struct field ParamSpec.default of type string

However, I was able to create the s2i-java-8-task in the same way.

Version: OpenShift v4.1.14

danielhelfand commented 5 years ago

@rutvik23 There was an update to the openshift-client task that can be seen here. Unfortunately, how to properly version tasks hasn't been fully worked out yet. The task update requires the OpenShift Pipelines 0.6 operator, which has not been released yet.

To address this issue in the meantime, you can create the task how it was previously:

apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: openshift-client
spec:
  inputs:
    params:
      - name: ARGS
        description: The OpenShift CLI arguments to run
        default: help
  steps:
    - name: oc
      image: quay.io/openshiftlabs/openshift-cli-tekton-workshop:2.0
      command: ["/usr/local/bin/oc"]
      args:
        - "${inputs.params.ARGS}"

I also pulled a previous version of the image used for the task and pushed it to this Quay repo: image: quay.io/openshiftlabs/openshift-cli-tekton-workshop:2.0. I am not sure if there is a tag under the OpenShift Pipelines Quay that works with the task. But you will need to switch out the image as well for the task.

I opened an issue around versioning the task here.

piyush-garg commented 5 years ago

This has been fixed with https://github.com/tektoncd/catalog/pull/81

piyush-garg commented 5 years ago

/close

openshift-ci-robot commented 5 years ago

@piyush-garg: You can't close an active issue/PR unless you authored it or you are a collaborator.

In response to [this](https://github.com/openshift/pipelines-tutorial/issues/21#issuecomment-533183003): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
piyush-garg commented 5 years ago

/close

openshift-ci-robot commented 5 years ago

@piyush-garg: Closing this issue.

In response to [this](https://github.com/openshift/pipelines-tutorial/issues/21#issuecomment-533188273): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.