This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.3. 创建管道任务
流程
从
pipelines-tutorial
仓库中安装apply-manifests
和update-deployment
Task
资源,其中包含管道的可重复使用任务列表:oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-3/01_pipeline/01_apply_manifest_task.yaml oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-3/01_pipeline/02_update_deployment_task.yaml
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-3/01_pipeline/01_apply_manifest_task.yaml $ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-3/01_pipeline/02_update_deployment_task.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用
tkn task list
命令列出您创建的任务:tkn task list
$ tkn task list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出会确认创建了
apply-manifests
和update-deployment
任务
:NAME DESCRIPTION AGE apply-manifests 1 minute ago update-deployment 48 seconds ago
NAME DESCRIPTION AGE apply-manifests 1 minute ago update-deployment 48 seconds ago
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用
tkn clustertasks list
命令列出由 Operator 安装的额外ClusterTask
资源,例如--buildah
和s2i-python-3
:注意您必须使用特权 pod 容器来运行
buildah
ClusterTask
资源,因为它需要特权安全上下文。如需了解更多有关 pod 安全性上下文约束(SCC)的信息,请参阅附加资源部分。tkn clustertasks list
$ tkn clustertasks list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出列出了 Operator 安装的
ClusterTask
资源:NAME DESCRIPTION AGE buildah 1 day ago git-clone 1 day ago s2i-php 1 day ago tkn 1 day ago
NAME DESCRIPTION AGE buildah 1 day ago git-clone 1 day ago s2i-php 1 day ago tkn 1 day ago
Copy to Clipboard Copied! Toggle word wrap Toggle overflow