-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use --prefix-name option for tkn clustertask start
Adding --prefix-name option for tkn clustertask start to allow a user to specify what the name of the TaskRun they will create is. Default name will follow the format clustertaskname-run-. This option will override --last, which will use the name of the last TaskRun for a clustertask if nothing is specified. Signed-off-by: vinamra28 <[email protected]>
- Loading branch information
1 parent
3bdd4ae
commit 231d374
Showing
8 changed files
with
227 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
pkg/cmd/clustertask/testdata/Test_ClusterTask_Start-Dry_Run_with_--prefix-name.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
creationTimestamp: null | ||
generateName: customname- | ||
labels: | ||
key: value | ||
spec: | ||
inputs: | ||
params: | ||
- name: myarg | ||
value: value1 | ||
- name: print | ||
value: | ||
- boom | ||
- boom | ||
resources: | ||
- name: my-image | ||
resourceRef: | ||
name: image | ||
- name: my-repo | ||
resourceRef: | ||
name: git | ||
outputs: | ||
resources: | ||
- name: code-image | ||
resourceRef: | ||
name: output-image | ||
serviceAccountName: svc1 | ||
taskRef: | ||
kind: ClusterTask | ||
name: clustertask-3 | ||
workspaces: | ||
- emptyDir: {} | ||
name: test | ||
status: | ||
podName: "" |
39 changes: 39 additions & 0 deletions
39
.../clustertask/testdata/Test_ClusterTask_Start-Dry_Run_with_--prefix-name_and_--last.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
creationTimestamp: null | ||
generateName: customname- | ||
labels: | ||
key: value | ||
spec: | ||
inputs: | ||
params: | ||
- name: myarg | ||
value: value | ||
- name: print | ||
value: | ||
- booms | ||
- booms | ||
- booms | ||
resources: | ||
- name: my-repo | ||
resourceRef: | ||
name: git | ||
outputs: | ||
resources: | ||
- name: code-image | ||
resourceRef: | ||
name: output-image | ||
- name: my-image | ||
resourceRef: | ||
name: image | ||
serviceAccountName: svc1 | ||
taskRef: | ||
kind: ClusterTask | ||
name: clustertask-1 | ||
timeout: 1h0m0s | ||
workspaces: | ||
- emptyDir: {} | ||
name: test | ||
status: | ||
podName: "" |
34 changes: 34 additions & 0 deletions
34
...tdata/Test_ClusterTask_Start_v1beta1-Dry_Run_with_--prefix-name_and_--last_v1beta1.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
creationTimestamp: null | ||
generateName: customname- | ||
labels: | ||
key: value | ||
spec: | ||
params: | ||
- name: myarg | ||
value: value | ||
- name: print | ||
value: | ||
- booms | ||
- booms | ||
- booms | ||
resources: | ||
inputs: | ||
- name: my-repo | ||
resourceRef: | ||
name: git | ||
outputs: | ||
- name: code-image | ||
resourceRef: | ||
name: output-image | ||
serviceAccountName: svc1 | ||
taskRef: | ||
kind: ClusterTask | ||
name: clustertask-1 | ||
workspaces: | ||
- emptyDir: {} | ||
name: test | ||
status: | ||
podName: "" |
35 changes: 35 additions & 0 deletions
35
...tertask/testdata/Test_ClusterTask_Start_v1beta1-Dry_Run_with_--prefix-name_v1beta1.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
creationTimestamp: null | ||
generateName: customname- | ||
labels: | ||
key: value | ||
spec: | ||
params: | ||
- name: myarg | ||
value: value1 | ||
- name: print | ||
value: | ||
- boom | ||
resources: | ||
inputs: | ||
- name: my-image | ||
resourceRef: | ||
name: image | ||
- name: my-repo | ||
resourceRef: | ||
name: git | ||
outputs: | ||
- name: code-image | ||
resourceRef: | ||
name: output-image | ||
serviceAccountName: svc1 | ||
taskRef: | ||
kind: ClusterTask | ||
name: clustertask-3 | ||
workspaces: | ||
- emptyDir: {} | ||
name: test | ||
status: | ||
podName: "" |