Skip to content

Commit

Permalink
add tkn clustertask start
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhelfand authored and tekton-robot committed Jan 14, 2020
1 parent a7962e5 commit 010bc97
Show file tree
Hide file tree
Showing 12 changed files with 838 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/cmd/tkn_clustertask.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ Manage clustertasks
* [tkn](tkn.md) - CLI for tekton pipelines
* [tkn clustertask delete](tkn_clustertask_delete.md) - Delete clustertask resources in a cluster
* [tkn clustertask list](tkn_clustertask_list.md) - Lists clustertasks in a namespace
* [tkn clustertask start](tkn_clustertask_start.md) - Start clustertasks

55 changes: 55 additions & 0 deletions docs/cmd/tkn_clustertask_start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## tkn clustertask start

Start clustertasks

### Usage

```
tkn clustertask start clustertask [RESOURCES...] [PARAMS...] [SERVICEACCOUNT]
```

### Synopsis

Start clustertasks

### Examples

Start ClusterTask foo by creating a TaskRun named "foo-run-xyz123" in namespace 'bar':

tkn clustertask start foo -n bar

or

tkn ct start foo -n bar

For params value, if you want to provide multiple values, provide them comma separated
like cat,foo,bar


### Options

```
-h, --help help for start
-i, --inputresource strings pass the input resource name and ref as name=ref
-l, --labels strings pass labels as label=value.
-L, --last re-run the clustertask using last taskrun values
-o, --outputresource strings pass the output resource name and ref as name=ref
-p, --param stringArray pass the param as key=value or key=value1,value2
-s, --serviceaccount string pass the serviceaccount name
--showlog show logs right after starting the clustertask
-t, --timeout int timeout for taskrun in seconds (default 3600)
```

### Options inherited from parent commands

```
-c, --context string name of the kubeconfig context to use (default: kubectl config current-context)
-k, --kubeconfig string kubectl config file (default: $HOME/.kube/config)
-n, --namespace string namespace to use (default: from $KUBECONFIG)
-C, --nocolour disable colouring (default: false)
```

### SEE ALSO

* [tkn clustertask](tkn_clustertask.md) - Manage clustertasks

109 changes: 109 additions & 0 deletions docs/man/man1/tkn-clustertask-start.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
.TH "TKN\-CLUSTERTASK\-START" "1" "" "Auto generated by spf13/cobra" ""
.nh
.ad l


.SH NAME
.PP
tkn\-clustertask\-start \- Start clustertasks


.SH SYNOPSIS
.PP
\fBtkn clustertask start clustertask [RESOURCES...] [PARAMS...] [SERVICEACCOUNT]\fP


.SH DESCRIPTION
.PP
Start clustertasks


.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for start

.PP
\fB\-i\fP, \fB\-\-inputresource\fP=[]
pass the input resource name and ref as name=ref

.PP
\fB\-l\fP, \fB\-\-labels\fP=[]
pass labels as label=value.

.PP
\fB\-L\fP, \fB\-\-last\fP[=false]
re\-run the clustertask using last taskrun values

.PP
\fB\-o\fP, \fB\-\-outputresource\fP=[]
pass the output resource name and ref as name=ref

.PP
\fB\-p\fP, \fB\-\-param\fP=[]
pass the param as key=value or key=value1,value2

.PP
\fB\-s\fP, \fB\-\-serviceaccount\fP=""
pass the serviceaccount name

.PP
\fB\-\-showlog\fP[=false]
show logs right after starting the clustertask

.PP
\fB\-t\fP, \fB\-\-timeout\fP=3600
timeout for taskrun in seconds


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-c\fP, \fB\-\-context\fP=""
name of the kubeconfig context to use (default: kubectl config current\-context)

.PP
\fB\-k\fP, \fB\-\-kubeconfig\fP=""
kubectl config file (default: $HOME/.kube/config)

.PP
\fB\-n\fP, \fB\-\-namespace\fP=""
namespace to use (default: from $KUBECONFIG)

.PP
\fB\-C\fP, \fB\-\-nocolour\fP[=false]
disable colouring (default: false)


.SH EXAMPLE
.PP
Start ClusterTask foo by creating a TaskRun named "foo\-run\-xyz123" in namespace 'bar':

.PP
.RS

.nf
tkn clustertask start foo \-n bar

.fi
.RE

.PP
or

.PP
.RS

.nf
tkn ct start foo \-n bar

.fi
.RE

.PP
For params value, if you want to provide multiple values, provide them comma separated
like cat,foo,bar


.SH SEE ALSO
.PP
\fBtkn\-clustertask(1)\fP
2 changes: 1 addition & 1 deletion docs/man/man1/tkn-clustertask.1
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Manage clustertasks

.SH SEE ALSO
.PP
\fBtkn(1)\fP, \fBtkn\-clustertask\-delete(1)\fP, \fBtkn\-clustertask\-list(1)\fP
\fBtkn(1)\fP, \fBtkn\-clustertask\-delete(1)\fP, \fBtkn\-clustertask\-list(1)\fP, \fBtkn\-clustertask\-start(1)\fP
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ k8s.io/cli-runtime v0.0.0-20191004110054-fe9b9282443f h1:vJOrMsZe+RD884n+WQ5So2o
k8s.io/cli-runtime v0.0.0-20191004110054-fe9b9282443f/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM=
k8s.io/client-go v0.0.0-20191004102537-eb5b9a8cfde7 h1:WyPHgjjXvF4zVVwKGZKKiJGBUW45AuN44uSOuH8euuE=
k8s.io/client-go v0.0.0-20191004102537-eb5b9a8cfde7/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20171101183504-39a7bf85c140 h1:j1Zez+Xb4OWvCdROqeq8sP2ACi/qWV1tj/imP0/8a0k=
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/clustertask/clustertask.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ func Command(p cli.Params) *cobra.Command {

flags.AddTektonOptions(cmd)
cmd.AddCommand(
listCommand(p),
deleteCommand(p),
listCommand(p),
startCommand(p),
)
return cmd
}
Loading

0 comments on commit 010bc97

Please sign in to comment.