SlideShare a Scribd company logo
17/09/2021
TESTABLE AND REUSABLE BUILD AUTOMATION
USING TEKTON
Join 2021
2
WHO AM I?
o Consultant at Ordina as Cloud automation Engineer
o Software architect & developer background
o Interested in: Automation, public cloud in enterprises, hyperscale software
o 30 years young, Koersel based
o Company blog
o LinkedIn
AGENDA
o Build automation
● What is build automation?
● What is used?
● Why is it important?
● Why test?
● How to test?
o Tekton
● What is Tekton?
● How does it work?
● What problem does it solve?
● Why should you use it?
● Tekton Setup
o Recap
4
BUILD AUTOMATION
Chapter 1
5
WHAT IS BUILD AUTOMATION?
6
WHAT IS COMMONLY USED?
o Consistent artefact creation
o Offloading build processes from developer laptops
o Ability to enable automated testing
o Improve scalability of building applications
o Repeatability of artefact creation
o Continuous integration
7
WHY IS BUILD AUTOMATION IMPORTANT?
• Software like any other
• It’s “just code”
• Easier debugging
• More consistent rollouts
• Ease the development process
• Knowing when a feature is “done”. Aka when all tests are green
• Code/software quality
8
WHY TEST?
Unit tests
• Validate business logic
• Validate a build step
• E.g.
• Update environment file
• Determine version number
• Create unique name
• Should be locally runnable
• Doesn’t test
• Integrations
• External tooling
• Validates output
9
HOW TO TEST?
Integration tests
• Validate that actions “tie
together” correctly
• Mocks integrations
• Uses specific test input
• E.g.
• Image build
• Validates
• Side effects in other
systems
• Context passing between
build steps
• Outcome
• Runnable in build system
E2E tests
• Validates complete pipeline
• Uses real input
• E.g.
• Application build
• Validates
• Task execution
• Order of task execution
• Uses real integrations
• Runnable in build system
10
TEKTON
Chapter 2
“Tekton is a powerful and flexible
open-source framework for creating
CI/CD systems, allowing developers
to build, test, and deploy across
cloud providers and on-premise
systems”
11
WHAT IS TEKTON?
Source: https://tekton.dev/
o Framework
o No out-of-the-box solution
o Spin-off of Knative project
o Backed by Google, IBM/Red Hat, Pivotal, …
o Part of the CD Foundation
o Core to Jenkins X, Core to OpenShift pipelines
o Multiple subprojects
o Dashboard
o Triggers
o Pipelines
o …
o Runs on top of Kubernetes
12
WHAT IS TEKTON?
None
13
WHAT PROBLEM DOES TEKTON SOLVE?
o Great building block for tailor fit solution
o Highly configurable/customizable
o Highly scalable (*)
o Kubernetes native
o Component definition
o “The right ingredient to make a fantastic meal”
14
WHY SHOULD I USE IT?
Pipeline
• Set of tasks
• Executed in order
• Optionally in parallel
• Defined as a single component
• Kubernetes Custom resources
• Used group a set of tasks which
produce an artefact
E.g.: Application build
Step
• Smallest execution component
• Kubernetes Container
• Container image + command
• Runs until completion
• Part of Task definition
E.g.: Maven test
Task
• Set of steps
• Executed in order
• Defined as a single component
• Kubernetes Custom resources
• Kubernetes Pod
• Used a logical set of steps which
only make sense if executed
together
E.g.: Maven build
15
HOW DOES IT WORK?
Terminology
Source: https://tekton.dev/docs/concepts/
Trigger
• External events
• Webhook
• Can trigger a pipeline
• Filtering
• Kubernetes Custom resources
• Trigger
• TriggerTemplate
TaskRun
• Actual execution of a task
• Directly connected to a pod
• Copies pod template from task
and runs it
• Kubernetes Custom resource
PipelineRun
• Actual execution of a pipeline
• Copies pipeline definition and
creates tasks
• Monitors tasks execution to
trigger new ones if needed
• Kubernetes Custom resource
16
HOW DOES IT WORK?
Terminology
Source: https://tekton.dev/docs/concepts/
17
HOW DOES IT WORK?
Terminology
Controllers
• Tekton controllers execute control loops
• Eventually consistent
• Reconcile state in cluster to resources defined in cluster
Source: https://tekton.dev/docs/concepts/
Workspace
• A work folder
• Share data between tasks
• Connected to a single pipeline
• Mapped to Persistent Volume Claim in Kubernetes
• Part of task and pipeline definitions
18
WORKFLOW
19
WORKFLOW
20
WORKFLOW
21
WORKFLOW
22
WORKFLOW
23
WORKFLOW
24
WORKFLOW
Unit tests
• Execute a single Tekton step
• Validate output
• Setup
• Only use scripts in “step”
• Standard testing (Python,
Bash, Java, …)
25
TESTING
Integration tests
• Execute single Tekton task
• Validate execution
• Validate side effects
• Custom pipeline
• Setup
• Use pre-task to setup
context
• Use post-task to perform
validations
E2E tests
• Execute Tekton pipeline
• Using real world input
• Optionally forked to prevent
naming conflicts
• Setup
• Have test pipeline create
another pipeline
• Validate output based on
Tekton pipelineRun
• Treat pipelines as regular code
• Versioning
• Automated testing
• Release cycle
• Move build system close to application landscape
• Makes test integration easier
• Adopt opensource tooling, even in corporate environment
• Tip: Tekline, Renovate bot
• Use tooling to assist in adoption
26
LESSONS LEARNED
Pieter Vincken
Cloud Automation Engineer
Competence Lead: Code2Cloud
E pieter.vincken@ordina.be

More Related Content

What's hot (20)

PDF
SBG Infrastructure Tools
🤘Ivan Vandot
 
KEY
Travis CI
bsiggelkow
 
PPTX
Automating the Quality
Dejan Vukmirovic
 
PDF
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
Tikal Knowledge
 
PDF
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Steffen Gebert
 
PPTX
Introduction to jenkins
Abe Diaz
 
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
PPTX
Gerrit + Jenkins = Continuous Delivery For Big Data
Stefano Galarraga
 
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
PPTX
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
NLJUG
 
PDF
From Virtual Machines to Containers
camunda services GmbH
 
PDF
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
CloudBees
 
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PDF
In cluster open source testing framework - Microservices Meetup
Neil Gehani
 
PDF
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
Alvin Huang
 
PDF
Containers all the way down
rhirschfeld
 
PDF
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
CloudBees
 
PDF
Continuous Testing
Crevise Technologies
 
SBG Infrastructure Tools
🤘Ivan Vandot
 
Travis CI
bsiggelkow
 
Automating the Quality
Dejan Vukmirovic
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
Tikal Knowledge
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Steffen Gebert
 
Introduction to jenkins
Abe Diaz
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
Gerrit + Jenkins = Continuous Delivery For Big Data
Stefano Galarraga
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
NLJUG
 
From Virtual Machines to Containers
camunda services GmbH
 
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
CloudBees
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
In cluster open source testing framework - Microservices Meetup
Neil Gehani
 
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
Alvin Huang
 
Containers all the way down
rhirschfeld
 
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
CloudBees
 
Continuous Testing
Crevise Technologies
 

Similar to JOIN 2021 Testable and reusable build automation Using Tekton (20)

PDF
Introduction to Tekton
Victor Iglesias
 
PDF
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
bashwen2022
 
PDF
Shifting Left with Cloud Native CI/CD
C4Media
 
PDF
Tekton showcase - CDF Summit Kubecon Barcelona 2019
Christie Wilson
 
PDF
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Nikhil Thomas
 
PDF
Take control of your dev ops dumping ground
Puppet
 
PDF
Cloud Native CI/CD with Jenkins X and Knative Pipelines
C4Media
 
PPTX
devops ppt for hjs jsdjhjd hsdbusinees.pptx
Deepakgupta273447
 
PPSX
CI-CD Jenkins, GitHub Actions, Tekton
Araf Karsh Hamid
 
PDF
DevOpsCon London: How containerized Pipelines can boost your CI/CD
Nico Meisenzahl
 
PDF
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
DoKC
 
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
PDF
Running CI/CD with VMWare Cloud PKS and Jenkins X
Cojan van Ballegooijen
 
PDF
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
PDF
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Omar Al-Safi
 
PDF
Herding Kats - Netflix’s Journey to Kubernetes Public
aspyker
 
PPTX
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
PDF
KubeCon 2017: Kubernetes from Dev to Prod
Subhas Dandapani
 
PDF
Why we chose Argo Workflow to scale DevOps at InVision
Nebulaworks
 
PPTX
Kubernetes Manchester - 6th December 2018
David Stockton
 
Introduction to Tekton
Victor Iglesias
 
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
bashwen2022
 
Shifting Left with Cloud Native CI/CD
C4Media
 
Tekton showcase - CDF Summit Kubecon Barcelona 2019
Christie Wilson
 
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Nikhil Thomas
 
Take control of your dev ops dumping ground
Puppet
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
C4Media
 
devops ppt for hjs jsdjhjd hsdbusinees.pptx
Deepakgupta273447
 
CI-CD Jenkins, GitHub Actions, Tekton
Araf Karsh Hamid
 
DevOpsCon London: How containerized Pipelines can boost your CI/CD
Nico Meisenzahl
 
Dok Talks #111 - Scheduled Scaling with Dask and Argo Workflows
DoKC
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
Running CI/CD with VMWare Cloud PKS and Jenkins X
Cojan van Ballegooijen
 
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Omar Al-Safi
 
Herding Kats - Netflix’s Journey to Kubernetes Public
aspyker
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
KubeCon 2017: Kubernetes from Dev to Prod
Subhas Dandapani
 
Why we chose Argo Workflow to scale DevOps at InVision
Nebulaworks
 
Kubernetes Manchester - 6th December 2018
David Stockton
 
Ad

Recently uploaded (20)

PPTX
English_Book_1 part 1 LET Reviewers NEw-
2022mimiacadserver
 
PDF
QYResearch Agricultural Machinery Market Overview, Top 30 Players Ranking, ke...
YangJunping
 
PPTX
The Brain Behind Your Device: A Deep Dive into Operating Systems
vanshshah1920
 
PDF
AI, parliamentary procedures and decision-making process
Dr. Fotios Fitsilis
 
PPTX
Correlation Research Grade 12 Presentation
angelieofolit
 
PPTX
Presentation for a short film .pptx.pptx
madisoncosta17
 
PPTX
The Waiting Time Sermon Delivered at SDA CHURCH.pptx
HumphreyAgala
 
PDF
Securing Africa’s future: Technology, culture and the changing face of threat
Kayode Fayemi
 
PPT
5-a-laws-of-motion-1.ppt class 11 physics
shreemsharma0117
 
PDF
Helpful but Terrifying: Older Adults' Perspectives of AI in Remote Healthcare...
Daniela Napoli
 
PDF
Exploring User Perspectives on Data Collection, Data Sharing Preferences, and...
Daniela Napoli
 
PPTX
Mastering the DevOps Certification: CI/CD, Governance & Monitoring Made Simple
shubhamsharma994585
 
PPTX
Enterprise Asset Management Overview with examples
ManikantaBN1
 
PPTX
Renters' Rights and PBSA. How the bill will impact on the sector
Nick Emms
 
PPTX
Creative perspective presentation copy.pptx
dreamsteel
 
PPTX
WATCHMAN, WATCH! - SERMON at SDA CHURCH.pptx
HumphreyAgala
 
PDF
481771880-Fundamentals-of-Public-Speaking.pdf
crisjseit1211
 
PPTX
India Energy and Utility Sector Landscape
Anand Akshay
 
PPTX
Patient with Upper & Lower GI bleeding .pptx
bdmlwb701
 
PPTX
2025-07-20 Abraham 08 (shared slides).pptx
Dale Wells
 
English_Book_1 part 1 LET Reviewers NEw-
2022mimiacadserver
 
QYResearch Agricultural Machinery Market Overview, Top 30 Players Ranking, ke...
YangJunping
 
The Brain Behind Your Device: A Deep Dive into Operating Systems
vanshshah1920
 
AI, parliamentary procedures and decision-making process
Dr. Fotios Fitsilis
 
Correlation Research Grade 12 Presentation
angelieofolit
 
Presentation for a short film .pptx.pptx
madisoncosta17
 
The Waiting Time Sermon Delivered at SDA CHURCH.pptx
HumphreyAgala
 
Securing Africa’s future: Technology, culture and the changing face of threat
Kayode Fayemi
 
5-a-laws-of-motion-1.ppt class 11 physics
shreemsharma0117
 
Helpful but Terrifying: Older Adults' Perspectives of AI in Remote Healthcare...
Daniela Napoli
 
Exploring User Perspectives on Data Collection, Data Sharing Preferences, and...
Daniela Napoli
 
Mastering the DevOps Certification: CI/CD, Governance & Monitoring Made Simple
shubhamsharma994585
 
Enterprise Asset Management Overview with examples
ManikantaBN1
 
Renters' Rights and PBSA. How the bill will impact on the sector
Nick Emms
 
Creative perspective presentation copy.pptx
dreamsteel
 
WATCHMAN, WATCH! - SERMON at SDA CHURCH.pptx
HumphreyAgala
 
481771880-Fundamentals-of-Public-Speaking.pdf
crisjseit1211
 
India Energy and Utility Sector Landscape
Anand Akshay
 
Patient with Upper & Lower GI bleeding .pptx
bdmlwb701
 
2025-07-20 Abraham 08 (shared slides).pptx
Dale Wells
 
Ad

JOIN 2021 Testable and reusable build automation Using Tekton

  • 1. 17/09/2021 TESTABLE AND REUSABLE BUILD AUTOMATION USING TEKTON Join 2021
  • 2. 2 WHO AM I? o Consultant at Ordina as Cloud automation Engineer o Software architect & developer background o Interested in: Automation, public cloud in enterprises, hyperscale software o 30 years young, Koersel based o Company blog o LinkedIn
  • 3. AGENDA o Build automation ● What is build automation? ● What is used? ● Why is it important? ● Why test? ● How to test? o Tekton ● What is Tekton? ● How does it work? ● What problem does it solve? ● Why should you use it? ● Tekton Setup o Recap
  • 5. 5 WHAT IS BUILD AUTOMATION?
  • 7. o Consistent artefact creation o Offloading build processes from developer laptops o Ability to enable automated testing o Improve scalability of building applications o Repeatability of artefact creation o Continuous integration 7 WHY IS BUILD AUTOMATION IMPORTANT?
  • 8. • Software like any other • It’s “just code” • Easier debugging • More consistent rollouts • Ease the development process • Knowing when a feature is “done”. Aka when all tests are green • Code/software quality 8 WHY TEST?
  • 9. Unit tests • Validate business logic • Validate a build step • E.g. • Update environment file • Determine version number • Create unique name • Should be locally runnable • Doesn’t test • Integrations • External tooling • Validates output 9 HOW TO TEST? Integration tests • Validate that actions “tie together” correctly • Mocks integrations • Uses specific test input • E.g. • Image build • Validates • Side effects in other systems • Context passing between build steps • Outcome • Runnable in build system E2E tests • Validates complete pipeline • Uses real input • E.g. • Application build • Validates • Task execution • Order of task execution • Uses real integrations • Runnable in build system
  • 11. “Tekton is a powerful and flexible open-source framework for creating CI/CD systems, allowing developers to build, test, and deploy across cloud providers and on-premise systems” 11 WHAT IS TEKTON? Source: https://tekton.dev/
  • 12. o Framework o No out-of-the-box solution o Spin-off of Knative project o Backed by Google, IBM/Red Hat, Pivotal, … o Part of the CD Foundation o Core to Jenkins X, Core to OpenShift pipelines o Multiple subprojects o Dashboard o Triggers o Pipelines o … o Runs on top of Kubernetes 12 WHAT IS TEKTON?
  • 13. None 13 WHAT PROBLEM DOES TEKTON SOLVE?
  • 14. o Great building block for tailor fit solution o Highly configurable/customizable o Highly scalable (*) o Kubernetes native o Component definition o “The right ingredient to make a fantastic meal” 14 WHY SHOULD I USE IT?
  • 15. Pipeline • Set of tasks • Executed in order • Optionally in parallel • Defined as a single component • Kubernetes Custom resources • Used group a set of tasks which produce an artefact E.g.: Application build Step • Smallest execution component • Kubernetes Container • Container image + command • Runs until completion • Part of Task definition E.g.: Maven test Task • Set of steps • Executed in order • Defined as a single component • Kubernetes Custom resources • Kubernetes Pod • Used a logical set of steps which only make sense if executed together E.g.: Maven build 15 HOW DOES IT WORK? Terminology Source: https://tekton.dev/docs/concepts/
  • 16. Trigger • External events • Webhook • Can trigger a pipeline • Filtering • Kubernetes Custom resources • Trigger • TriggerTemplate TaskRun • Actual execution of a task • Directly connected to a pod • Copies pod template from task and runs it • Kubernetes Custom resource PipelineRun • Actual execution of a pipeline • Copies pipeline definition and creates tasks • Monitors tasks execution to trigger new ones if needed • Kubernetes Custom resource 16 HOW DOES IT WORK? Terminology Source: https://tekton.dev/docs/concepts/
  • 17. 17 HOW DOES IT WORK? Terminology Controllers • Tekton controllers execute control loops • Eventually consistent • Reconcile state in cluster to resources defined in cluster Source: https://tekton.dev/docs/concepts/ Workspace • A work folder • Share data between tasks • Connected to a single pipeline • Mapped to Persistent Volume Claim in Kubernetes • Part of task and pipeline definitions
  • 25. Unit tests • Execute a single Tekton step • Validate output • Setup • Only use scripts in “step” • Standard testing (Python, Bash, Java, …) 25 TESTING Integration tests • Execute single Tekton task • Validate execution • Validate side effects • Custom pipeline • Setup • Use pre-task to setup context • Use post-task to perform validations E2E tests • Execute Tekton pipeline • Using real world input • Optionally forked to prevent naming conflicts • Setup • Have test pipeline create another pipeline • Validate output based on Tekton pipelineRun
  • 26. • Treat pipelines as regular code • Versioning • Automated testing • Release cycle • Move build system close to application landscape • Makes test integration easier • Adopt opensource tooling, even in corporate environment • Tip: Tekline, Renovate bot • Use tooling to assist in adoption 26 LESSONS LEARNED
  • 27. Pieter Vincken Cloud Automation Engineer Competence Lead: Code2Cloud E [email protected]