Implement Triggers

Learn how to implement Tekton Triggers on an existing Pipeline.

Let’s extend the Pipeline created in the last chapter with Tekton Triggers. We want an EventListener that listens for events from GitHub. When an event is detected, we want to execute a Pipeline. We’ll start with creating a TriggerTemplate to specify which Pipeline to run when the event happens.

TriggerTemplate

In the trigger-template.yaml file, we defined a TriggerTemplate and specified some parameters. It contains a resource template definition for a PipelineRun. The PipelineRun object is similar to the one we saw in the previous chapter. It references the build-deploy Pipeline and uses the values from the ...