https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md
-
安装Tekton CLI(与Tekton交互的CLI)
curl -LO https://github.com/tektoncd/cli/releases/download/v0.7.1/tkn_0.7.1_Linux_x86_64.tar.gz
tar xvzf tkn_0.7.1_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn

-
vim hello-word.yaml
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: echo-hello-world-task
spec:
steps:
- name: use-ubuntu-to-echo-a-hello-world
image: ubuntu
command:
- echo
args:
- "Hi, a hello world from tekton!"
---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: echo-hello-world-task-run
spec:
taskRef:
name: echo-hello-world-task
-
kc apply -f hello-world.yaml

-
tkn taskrun

-
tkn tr list

task默认namespace:default

-
tkn tr cancel


-
tkn tr delete

-
再次运行,describe

-
测试cancel的作用(终止运行/不再继续运行,describe\list\log操作均表示cancelled)



-
tkn task list

-
如何取消cancelled状态,使之继续运行?
-
修改yaml,再次运行


-
describe


853

被折叠的 条评论
为什么被折叠?



