搜索

1.3. 创建管道任务

download PDF

流程

  1. pipelines-tutorial 存储库安装 apply-manifestsupdate-deployment 任务资源,其中包含可为管道重复使用的任务列表:

    $ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/pipelines-1.15/01_pipeline/01_apply_manifest_task.yaml
    $ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/pipelines-1.15/01_pipeline/02_update_deployment_task.yaml
  2. 使用 tkn task list 命令列出您创建的任务:

    $ tkn task list

    输出会确认创建了 apply-manifestsupdate-deployment 任务:

    NAME                DESCRIPTION   AGE
    apply-manifests                   1 minute ago
    update-deployment                 48 seconds ago
  3. 使用 tkn clustertasks list 命令列出由 Operator 安装的额外集群任务,如 buildahs2i-python

    注意

    要在受限环境中使用 buildah 集群任务,您必须确保 Dockerfile 使用内部镜像流作为基础镜像。

    $ tkn clustertasks list

    输出列出了 Operator 安装的 ClusterTask 资源:

    NAME                       DESCRIPTION   AGE
    buildah                                  1 day ago
    git-clone                                1 day ago
    s2i-python                               1 day ago
    tkn                                      1 day ago
重要

在 Red Hat OpenShift Pipelines 1.10 中,ClusterTask 功能已弃用,计划在以后的发行版本中删除。

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.