Reader small image

You're reading from  Building CI/CD Systems Using Tekton

Product typeBook
Published inSep 2021
PublisherPackt
ISBN-139781801078214
Edition1st Edition
Right arrow
Author (1)
Joel Lord
Joel Lord
author image
Joel Lord

Joel Lord (joel__lord on Twitter) is passionate about the web and technology in general. He likes to learn new things, but most of all, he wants to share his discoveries. He does so by traveling to various conferences all across the globe. He graduated from college with a degree in computer programming in the last millennium. Apart from a little break to get his BSc in computational astrophysics, he has always worked in the industry. In his daily job, Joel is a developer advocate with MongoDB, where he connects with software engineers to help them make the web better by using best practices around JavaScript. In his free time, he can be found stargazing on a campground somewhere or brewing a fresh batch of beer in his garage.
Read more about Joel Lord

Right arrow

Using workspaces in pipeline runs

As part of your pipeline definition, you cannot add a workspace the same way you could add default values to your parameters. If you want Tekton to start your pipeline automatically with the appropriate persistent volume claim, you will need to create a pipeline run:

  1. Start with a new file called pipelinerun.yaml. In there, create an object of kind PipelineRun. Like what you did with task runs, this object will have a generateName field instead of an actual name:
    apiVersion: tekton.dev/v1beta1 
    kind: PipelineRun 
    metadata: 
      generateName: clone-and-ls-pr- 
    spec: 
  2. This pipeline run will use the pipeline that you just built called clone-and-list:
      pipelineRef: 
        name: clone-and-list 
  3. Finally, add a workspace named codebase. This workspace uses a persistent volume claim, and the claimName is tekton-pvc:
     workspaces: 
       - name: codebase 
         persistentVolumeClaim...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building CI/CD Systems Using Tekton
Published in: Sep 2021Publisher: PacktISBN-13: 9781801078214

Author (1)

author image
Joel Lord

Joel Lord (joel__lord on Twitter) is passionate about the web and technology in general. He likes to learn new things, but most of all, he wants to share his discoveries. He does so by traveling to various conferences all across the globe. He graduated from college with a degree in computer programming in the last millennium. Apart from a little break to get his BSc in computational astrophysics, he has always worked in the industry. In his daily job, Joel is a developer advocate with MongoDB, where he connects with software engineers to help them make the web better by using best practices around JavaScript. In his free time, he can be found stargazing on a campground somewhere or brewing a fresh batch of beer in his garage.
Read more about Joel Lord