openshift / pipelines-tutorial

A step-by-step tutorial showing OpenShift Pipelines
Apache License 2.0
298 stars 621 forks source link

Tutorial pipeline fails at update-deployment step #105

Closed alif-munim closed 3 years ago

alif-munim commented 3 years ago

Details

There isn't much info in the logs, but below is all I was able to find when looking through the pipelinerun yaml.

build-and-deploy-run-kw27h-update-deployment-2nnxc:
      pipelineTaskName: update-deployment
      status:
        conditions:
          - lastTransitionTime: '2020-10-02T18:53:52Z'
            message: >-
              bound workspaces did not match declared workspaces: provided extra
              values: [source]
            reason: TaskRunValidationFailed
            status: 'False'
            type: Succeeded
        podName: ''
        startTime: '2020-10-02T18:53:52Z'

I followed the pipelines tutorial on the openshift docs exactly, but I'm still running into this error.

Below is the command I'm running to start the pipelinerun, as written in the docs: tkn pipeline start build-and-deploy -w name=shared-workspace,claimName=source-pvc -p deployment-name=vote-api -p git-url=http://github.com/openshift-pipelines/vote-api.git -p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/vote-api

Any help would be appreciated. Thanks!

alif-munim commented 3 years ago

I took a closer look at the yaml file for the update-deployment task and compared it to the yaml file for the apply-manifest task, which was working correctly. It turns out the spec for update-deployment is missing the following snippet before the params section:

workspaces:
  - name: source

If you're following the openshift docs and encountering the same error, edit your update-deployment task yaml and add the above snippet into your spec before the params section and you should be good to go!