cli: Return value of tkn pipeline start with --showlog does not depend on state of started pipeline

Versions and Operating System

  • Kubernetes version:
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.6+5157800", GitCommit:"eddac29feb4bb46b99fb570999324e582d761a66", GitTreeState:"clean", BuildDate:"2022-10-11T13:02:03Z", GoVersion:"go1.18.7", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.24.1
Pipeline version: v0.37.5
Triggers version: v0.20.2
Operator version: v0.60.1
  • Operating System:
Linux

Expected Behavior

When I run a pipeline with tkn pipeline start <pipeline-name> --showlog and the pipeline fails, I expect the return value of the tkn command is also non 0. In this way it is possible to start a pipeline from another pipeline and fail the first one, if the second one has failed.

Actual Behavior

The return value of tkn pipeline start <pipeline-name> --showlog is 0, if the started pipeline fails.

Steps to Reproduce the Problem

  1. tkn pipeline start <pipeline-name> --showlog || echo "run failed"

The “run failed” string is never shown, even if the started pipeline failed.

Additional Info

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 28 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @avinal , can I try your branch? Is it completed?

Hey @ileixe, yes the fix is completed and tested manually but I couldn’t figure out the tests and got busy elsewhere. Please feel free to continue. Thank You

+1 for this feature to use tkn cli for CI runner. Now, it’s completely inconsistent just to rely on “tkn start --showlog” for the job. We’re very happy to have this.

I have asked for help on the channel, so far, there is no significant progress.

Looks like I need some help here. Apology for delay. I will start working again.

/remove-lifecycle rotten Please don’t give up the implementation here, it is an important feature for us!