Setting up a Pipeline Template Catalog

1 minute read

Pipeline Template Catalogs are defined as catalog.yaml files, which are stored at the root of the source code repository.

An example Pipeline Template Catalog is available in the GitHub repository cloudbees/cloudbees-examples under the pipeline-template-examples directory.

To set up a repository for Pipeline Templates:

  1. Create a source code repository for the Catalog.

  2. Apply permissions settings to the repository to ensure that only approved authors of templates has write access.

This repository will store the catalog.yaml, Jenkinsfile and template.yaml files for your Pipeline Template Catalog.

To set up a Pipeline Template Catalog, create a catalog.yaml file:

  1. Using the text editor of your choice, create a blank file.

  2. Populate the file with the appropriate values.

  3. Save the file as catalog.yaml.

  4. Commit the file to the root of your source code repository.

Understanding catalog.yaml parameters

The table below provides the details of the parameters available in the catalog.yaml file.

Parameter

Description

type

The definition of the catalog YAML syntax. Must be: type: pipeline-template-catalog.

version

The version of the catalog YAML syntax.

name

The unique identifier for the catalog.

displayName

The name to be shown in the CloudBees CI user interface.

Example catalog.yaml file

This example is from catalog.yaml:

version: 1 type: pipeline-template-catalog name: customerPortalFrontendTeamCatalog displayName: Shared Template Catalog for Teams Working on the Customer Portal