1 of 19

Simple CI/CD with Tekton and the Tekton webhooks extension

Adam Roberts, IBM

© 2019 All Rights Reserved.

1

2 of 19

Disclaimer!

What we’re working on is a big work in progress – come and contribute!

© 2019 All Rights Reserved.

2

3 of 19

Picture With Caption Subtitle

© 2019 All Rights Reserved.

3

4 of 19

What’s in store for you today?

Install Tekton Dashboard and Webhooks Extension

Import Tekton Task and Pipeline Definitions

Create secrets

Push code

Observe results via the Tekton Dashboard

© 2019 All Rights Reserved.

4

5 of 19

Installing the Tekton Dashboard

© 2019 All Rights Reserved.

5

6 of 19

Installing the Webhooks Extension

Warning: this part is still experimental!

  • Only supports certain Pipelines
  • We’ll create Tekton resources for you
  • HTTPS through OpenShift or your own certificates on a laptop*

  • Check the latest docs for instructions/limitations – use on your own laptop first and I’m using a VPN for simplicity!

© 2019 All Rights Reserved.

6

7 of 19

Tekton Dashboard benefits

Monitoring

    • Tekton Pipelines, PipelineRuns,Tasks, TaskRuns and PipelineResources (Images, Git)

Creating

    • Create and rebuild PipelineRuns
    • Import resources from repository
    • Create secrets
      • Docker and Git for use in Pipelines
        • We handle annotations
        • We patch service accounts

Easy to install and set up

Tested on

      • OpenShift 3.11
      • Minishift
      • Docker Desktop

Active development

    • Come and get involved!

© 2019 All Rights Reserved.

7

8 of 19

© 2019 All Rights Reserved.

8

9 of 19

© 2019 All Rights Reserved.

9

10 of 19

What kind of Pipelines can we run with webhooks?

Resource name restrictions apply

Git source named: git-source

Docker image named: docker-image

© 2019 All Rights Reserved.

10

11 of 19

Tekton secrets made easy

© 2019 All Rights Reserved.

11

12 of 19

Webhook creation

© 2019 All Rights Reserved.

12

13 of 19

Importing access tokens

© 2019 All Rights Reserved.

13

14 of 19

A webhook triggered simple pipeline

© 2019 All Rights Reserved.

14

15 of 19

Resources created

  • PipelineRun* (uniquely named)
  • PipelineRunBindings referencing:
    • PipelineResource: webhook name-docker-image-timestamp
    • PipelineResource: webhook name-git-source-timestamp

* In a namespace of your choice, running under a service account of your choosing

© 2019 All Rights Reserved.

15

16 of 19

Demo!

© 2019 All Rights Reserved.

16

17 of 19

What’s next?

Dashboard

    • Filtering and sorting by label
    • Visual representation of Pipelines and their runs, Tasks and their runs
    • Run any Pipeline (configurable parameters)

Webhooks extension

    • Remove our Go sink in favour of tektoncd/triggers (backend)
    • Work with any Pipeline
    • Operator install alongside the dashboard, optionally when you install Tekton pipelines

© 2019 All Rights Reserved.

17

18 of 19

Bonus slide

© 2019 All Rights Reserved.

18

19 of 19

© 2019 All Rights Reserved.

19