4.3. 创建管道任务
流程
从
pipelines-tutorial
存储库(它包括了一组可为管道重复使用的任务)中安装apply-manifests
和update-deployment
任务:$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-1/01_pipeline/01_apply_manifest_task.yaml $ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-1/01_pipeline/02_update_deployment_task.yaml
使用
tkn task list
命令列出您创建的任务:$ tkn task list
输出会确认创建了
apply-manifests
和update-deployment
任务:NAME DESCRIPTION AGE apply-manifests 1 minute ago update-deployment 48 seconds ago
使用
tkn clustertasks list
命令列出由 Operator 安装的额外 ClusterTasks,如buildah
和s2i-python-3
:注意您必须使用特权 Pod 容器来运行
buildah ClusterTask
,因为它需要特权安全上下文。如需了解更多有关 pod 安全性上下文约束(SCC)的信息,请参阅附加资源部分。$ tkn clustertasks list
输出中列出了 Operator 安装的 ClusterTasks:
NAME DESCRIPTION AGE buildah 1 day ago buildah-v0-11-3 1 day ago git-clone 1 day ago jib-maven 1 day ago kn 1 day ago maven 1 day ago openshift-client 1 day ago openshift-client-v0-11-3 1 day ago s2i 1 day ago s2i-dotnet-3 1 day ago s2i-dotnet-3-v0-11-3 1 day ago s2i-go 1 day ago s2i-go-v0-11-3 1 day ago s2i-java-11 1 day ago s2i-java-11-v0-11-3 1 day ago s2i-java-8 1 day ago s2i-java-8-v0-11-3 1 day ago s2i-nodejs 1 day ago s2i-nodejs-v0-11-3 1 day ago s2i-perl 1 day ago s2i-perl-v0-11-3 1 day ago s2i-php 1 day ago s2i-php-v0-11-3 1 day ago s2i-python-3 1 day ago s2i-python-3-v0-11-3 1 day ago s2i-ruby 1 day ago s2i-ruby-v0-11-3 1 day ago s2i-v0-11-3 1 day ago tkn 1 day ago