Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Building CI/CD Systems Using Tekton
  • Table Of Contents Toc
  • Feedback & Rating feedback
Building CI/CD Systems Using Tekton

Building CI/CD Systems Using Tekton

By : Joel Lord
5 (3)
close
close
Building CI/CD Systems Using Tekton

Building CI/CD Systems Using Tekton

5 (3)
By: Joel Lord

Overview of this book

Tekton is a powerful yet flexible Kubernetes-native open source framework for creating continuous integration and continuous delivery (CI/CD) systems. It enables you to build, test, and deploy across multiple cloud providers or on-premise systems. Building CI/CD Systems Using Tekton covers everything you need to know to start building your pipeline and automating application delivery in a cloud-native environment. Using a hands-on approach, you will learn about the basic building blocks, such as tasks, pipelines, and workspaces, which you can use to compose your CI/CD pipelines. As you progress, you will understand how to use these Tekton objects in conjunction with Tekton Triggers to automate the delivery of your application in a Kubernetes cluster. By the end of this book, you will have learned how to compose Tekton Pipelines and use them with Tekton Triggers to build powerful CI/CD systems.
Table of Contents (20 chapters)
close
close
1
Section 1: Introduction to CI/CD
4
Section 2: Tekton Building Blocks
12
Section 3: Tekton Triggers
15
Section 4: Putting It All Together

Cleaning up with finally

On that last pipeline run, a fatal error occurred. It tried to clone the repository, but Git requires an empty directory to clone the files into. The folder already had files from the previous clone operation.

To avoid those errors and ensure that you always start from a clean slate, you will need to clean up your persisting workspaces when the pipeline run has terminated. To do so, you will need to add a cleanup task. You will also need to ensure this task runs at the end of the pipeline, even if an error terminated the pipeline before it completed its run. This is where the finally tasks will come into play.

In this section, you will add a cleanup task to your pipeline that will remove all the files from the workspace:

  1. Create a new file called cleanup.yaml. In here, create a new task named cleanup:
    apiVersion: tekton.dev/v1beta1 
    kind: Task 
    metadata: 
      name: cleanup 
    spec: 
  2. Just like the other tasks you've built in this...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY