2

Is it possible to enable CI/CD automation using Tekton Pipeline ? I have my project in GitHub repo. and whenever I make a change, I want to perform the build and deployment in Kubernetes automatically? I came across Prow, Trigger etc. If anyone could share the pros and cons and the best approach, that would be very helpful. Thanks in advance!

testbg testbg
  • 193
  • 2
  • 11

2 Answers2

1

Is it possible to enable CI/CD automation using Tekton Pipeline?

Yes, Tekton Pipelines is a controller for implementing CI/CD pipelines in Kubernetes using CRDs.

I have my project in GitHub repo. and whenever I make a change, I want to perform the build and deployment in Kubernetes automatically?

Yes, with Tekton Triggers you can setup a webhook from GitHub that triggers a new run of your CI/CD pipeline each time you "make a change" in your git repository.

Prow is a group of tools used for build automation within the Kubernetes project, they are a bit complex to use for a custom app project. One of the components is a ChatOps tool, that can trigger build pipelines using chat-commands in comments to GitHub pull-requests. Jenkins X is also adopting ChatOps functionality.

Jonas
  • 121,568
  • 97
  • 310
  • 388
  • Sorry for my delayed response. Thanks Much! Will check Tekton Triggers. – testbg testbg May 21 '20 at 14:48
  • Hi Jonas, Thanks! Could you please let me know he ChatOps tool? Is i LightHouse? Thanks! Also, are there any tekton trigger example that triggers the build when a github commit is done? Thanks in advance! – testbg testbg Jun 16 '20 at 16:36
1

Also, are there any tekton trigger example that triggers the build when a github commit is done?

Sure! Have a look at the official repo: https://github.com/tektoncd/triggers/tree/master/examples/github

Version 0.6.0 introduced interceptors for github and bitbucket, for example an eventlistener for github webhook:

apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
  name: github-listener-interceptor
spec:
  triggers:
    - name: github-listener
      interceptors:
        - github:
            secretRef:
              secretName: github-secret
              secretKey: secretToken
            eventTypes:
              - pull_request
        - cel:
            filter: "body.action in ['opened', 'synchronize', 'reopened']"
      bindings:
        - ref: github-pr-binding
      template:
        ref: github-template
tost
  • 41
  • 5