Setting up a Pipeline Template Catalog

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

Parameter Description Required

type

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

Yes

version

The version of the catalog YAML syntax

Yes

name

The unique identifier for the catalog

Yes

displayName

The name to be shown in the CloudBees Core user interface

Yes

Example catalog.yaml file

version: 1
type: pipeline-template-catalog

name: customerPortalFrontendTeamCatalog
displayName: Shared Template Catalog for Teams Working on the Customer Portal
Copyright © 2010-2019 CloudBees, Inc.Online version published by CloudBees, Inc. under the Creative Commons Attribution-ShareAlike 4.0 license.CloudBees and CloudBees DevOptics are registered trademarks and CloudBees Core, CloudBees CodeShip, CloudBees Jenkins Enterprise, CloudBees Jenkins Platform, CloudBees Jenkins Operations Center and DEV@cloud are trademarks of CloudBees, Inc. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Jenkins is a registered trademark of the non-profit Software in the Public Interest organization. Used with permission. See here for more info about the Jenkins project. The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. Read more at www.cloudbees.com/jenkins/about. Apache, Apache Ant, Apache Maven, Ant and Maven are trademarks of The Apache Software Foundation. Used with permission. No endorsement by The Apache Software Foundation is implied by the use of these marks.Other names may be trademarks of their respective owners. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this content, and CloudBees was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this content, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.