openshift / pipelines-tutorial

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

Fix tutorial bugs #54

Closed ncskier closed 4 years ago

ncskier commented 4 years ago

Fixes #53

  1. use 'workingDir' instead of 'workingdir'
  2. run with 'pipeline' ServiceAccount
ncskier commented 4 years ago

Thanks for the review! I've updated my PR to only fix the workingdir -> workingDir typo. I am still seeing a failure on my OpenShift environment when I don't specify a ServiceAccount with --serviceaccount. However, I understand that it might be something wrong with the way I've set up my system.

piyush-garg commented 4 years ago

I don't know why it is failing, I just tried twice and both times worked without any change

tkn pr ls
NAME                         STARTED         DURATION    STATUS      
build-and-deploy-run-2cw5b   7 minutes ago   7 minutes   Succeeded   
build-and-deploy-run-q2pc6   8 minutes ago   8 minutes   Succeeded

Can you please provide the logs of the pipelinerun?

ncskier commented 4 years ago

Thanks for looking into it. Might be something wrong with the tekton controller pod that's running? I installed using the OpenShift 0.8.2 Operator. However, my TaskRuns have an empty serviceAccountName:

serviceAccountName: ""

I checked the config-defaults ConfigMap in the openshift-pipelines namespace and it does have the proper default serviceAccount set:

  default-service-account: pipeline
sthaha commented 4 years ago

/approve

openshift-ci-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncskier, sthaha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/pipelines-tutorial/blob/master/OWNERS)~~ [sthaha] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
sthaha commented 4 years ago

Thanks for looking into it. Might be something wrong with the tekton controller pod that's running? I installed using the OpenShift 0.8.2 Operator. However, my TaskRuns have an empty serviceAccountName:

serviceAccountName: ""

I checked the config-defaults ConfigMap in the openshift-pipelines namespace and it does have the proper default serviceAccount set:

  default-service-account: pipeline

@ncskier Could you please verify if the

oc -n openshift-pipelines get cm config-defaults -o jsonpath='{ .data.default-service-account } '

gives you pipeline and that the webhook pod is running oc get -n openshift-pipelines pods -l app=tekton-pipelines-webhook ? if it running, what does the log look like?

e.g.

oc -n openshift-pipelines logs deployment/tekton-pipelines-webhook   

should produce something like below

"level":"info","logger":"webhook.config-store","caller":"configmap/store.go:169","msg":"defaults config \"config-defaults\" config was added or updated: &{60 pipeline}",
"knative.dev/controller":"webhook"
ncskier commented 4 years ago

Yes, oc -n openshift-pipelines get cm config-defaults -o jsonpath='{ .data.default-service-account } ' gives pipeline.

# oc -n openshift-pipelines get cm config-defaults -o jsonpath='{ .data.default-service-account }'
pipeline

Also yes, the tekton pipelines webhook has that in the logs

# oc get -n openshift-pipelines pods -l app=tekton-pipelines-webhook
NAME                                        READY   STATUS    RESTARTS   AGE
tekton-pipelines-webhook-65856dff6c-nq7m9   1/1     Running   0          6d1h
# oc -n openshift-pipelines logs deployment/tekton-pipelines-webhook   
...
{"level":"info","logger":"webhook.config-store","caller":"configmap/store.go:169","msg":"defaults config \"config-defaults\" config was added or updated: &{60 pipeline}","knative.dev/controller":"webhook"}
sthaha commented 4 years ago

@ncskier 😕 I am lost here .. what I gather from above is that the webhook is setting the default sa as pipeline. Are you able to reproduce this consistently? If so, could you please file a bug?