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

94 views Asked by At

I am using the 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 to the toolchain? It should be an existing repo and not to be cloned or forked.

Specifying existing instead of clone as type did not work.

1

There are 1 answers

0
data_henrik On BEST ANSWER

The 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 works:

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']

The type: "link" refers to an existing repository. The repo URLs refer to the mentioned tekton-catalog. What is interesting is that by specifying kind: ['pipeline'] the repo configuration is not specified in the configuration dialog, but integrated as specified.

In your tekton.yml add a reference to the configured catalog in the input section and referencing an environment variable that you declared for the pipeline in the toolchain.yml. Something like

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

with TEKTON_CATALOG_REPO based on

 TEKTON_CATALOG_REPO: tekton-catalog

set as environment variable for the specific toolchain part.