tektoncd / tektoncd/cli

Make tkn easier to automate: add run name output, add status check

Open
#771 20 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

Version and Operating System

tkn Version:
0.8.0

Expected Behavior

I want to automate task/pipeline runs with tkn.
So i want to be able to do smth like

run_name=$(tkn p start -o name pipeline_name)
tkn pr logs -f $run_name
exit $(tkn pr status $run_name)

or shorter

tkn p start --showlog --watch pipeline_name

So it would be nice to add:

  • option "only output a name of new created run" to run command
  • status command to find out how run ended
  • optionally: add "watch and exit with run status" option to run command

I know that i now can get all data from pipeline run body, but name/status fields seem to be standard enough to deserve separate call in command line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing tkn p start and tkn pr command entry points and reproduce the shell examples from the issue. Define completion around a run-name-only output option, a status command with an exit result, and optionally watching with the run status; verify the resulting commands support automation as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.