IBM Cloud:如何将 Tekton Catalog 添加到持续交付工具链配置中?

IBM Cloud: How to add Tekton Catalog to Continuous Delivery toolchain configuration?

我正在使用 Continuous Delivery service in IBM Cloud. My toolchain is defined using a YAML file and stored in the .bluemix directory in my GitHubcode repository. I am using Tekton for the pipeline. How can I add the Tekton Catalog 工具链?它应该是一个现有的 repo,不能被克隆或分叉。

指定 existing 而不是 clone 作为类型无效。

Wiki in the open-toolchain/sdk repo has only basic information about how to specify GitHub integration. After looking through many code samples and related testing I found that the following service specification in the toolchain.yml 作品:

services:
  tekton-catalog:
    service_id: githubpublic
    parameters:
      repo_url: "https://github.com/open-toolchain/tekton-catalog"
      source_repo_url: "https://github.com/open-toolchain/tekton-catalog"
      type: "link"
      has_issues: false
      enable_traceability: false
      kind: ['pipeline']

type: "link" 指的是现有存储库。回购 URL 指的是提到的 tekton-catalog。有趣的是,通过指定 kind: ['pipeline'],repo 配置并没有在配置对话框中指定,而是按照指定的方式集成。

在您的 tekton.yml 中添加对输入部分中已配置目录的引用,并引用您在 [=27= 中为管道声明的环境变量]toolchain.yml。像

inputs:
- type: git
  branch: master
  service: ${TEKTON_CATALOG_REPO}
  path: container-registry

和 TEKTON_CATALOG_REPO 基于

 TEKTON_CATALOG_REPO: tekton-catalog

设置为特定工具链部分的环境变量。