SlideShare a Scribd company logo
1 of 10
Download to read offline
https://www.flickr.com/photos/amerune/9294639633/in/photostream/
Jenkins Pipelines
Ramanathan Muthaiah,
rus.cahimb@gmail.com
DevOps Meetup, Bengaluru,
19/Aug/2017
What’s in it for me?
Pipeline helps to,
codify build flow
divide monolithic build
to logical stages
bind execution of one
or more stages based
on previous stage’s
result
abstract common tasks
to shared libraries
Learn Groovy DSL (scripted
syntax, shared libraries)
Declarative syntax follows
imperative model
Jenkins v2.x + Pipeline suite
of plugins
Tons and tons of patience to
toil, sweat a.k.a. R(ead),
A(pply), D(ocument) and
S(hare)
lots and lots of
Pre-requisites
https://www.flickr.com/photos/87232391@N00/403119696
Getting Started. . .
Have a test Jenkins master,
playground for trial and error
mirror (as close as possible) production instance
access to rest of infra or replicate where infra cannot be shared (e.g:
artifactory, s3, build agents)
mental model of what to do — logical blocks needed, how to tie them
up, what can or cannot be done in parallel, archive, notifications.
Tooo……ooons of material on the Internet on Jenkins Pipeline
Bite the bullet . . . Start writing pipeline as code
Start with individual stages, one stage at a time
Pipeline syntax and snippet generator
Pipeline script in <Version Control> => modify, build, test : repeat
Better yet, Replay on the passed or failed job
update on the fly, build, test
But, but, no Replay for builds failed on Groovy syntax :-(
Namaskara…
#!groovy
node(‘linux’) { // any build agent with label, linux;if left blank, master
stage(‘Prep’) {
def greet = “Welcome to Pipeline” // variable declaration
echo “${greet}”
sh “uname -a”
def ip_address = sh(returnStdout: true, 
script: “ifconfig eth0 | grep -i inet | head -1 | awk -F’:’ ‘{print $2}’
| awk -F’ ‘ ‘{print $1}’”).trim()
println “Node’s IP address, ip_address”
}
}
Common Gotchas…
Pipeline syntax errors
DO NOT copy and paste from your editor or from the previous slide
Most common: Typos in pipeline code
Cautious with usage of Unix tools within Pipeline
single, double quotes
Got it finally…
#!groovy
node(‘linux’) { // build agent with label ‘linux’;if left blank,
master
stage("Prep") {
def greet = “Welcome to Pipeline" // variable declaration
echo "${greet}"
sh "uname -a"
sh "'/sbin/ifconfig eth0 | 
grep -i inet | head -1 | 
cut -d: -f2 |
awk -F' ' '{print $1}' 
"'
}
sh step has many avatars
1. sh “command”
2. sh (returnStdout …)
3. sh (returnStatus …)
4. sh followed by three single or double quotes
(for variable interpolation)
Output from build console log
useful links
Online examples for various steps…
wiki => https://jenkins.io/doc/pipeline/examples/
code => https://github.com/jenkinsci/pipeline-examples/tree/master/
pipeline-examples
contribute your’s today, https://github.com/jenkinsci/pipeline-examples
Plugins compatible with Pipeline
https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md
Pipeline resources
Syntax reference, https://jenkins.io/doc/book/pipeline/syntax
Steps reference, https://jenkins.io/doc/pipeline/steps
BlueOcean
https://jenkins.io/doc/book/blueocean
Handling SCM … Git
Have generic service accounts, avoid storing user credentials
Jenkins has built-in implementation of Git :-)
But, it may not be in sync with generally available version of Git :-(
Handling large Git repos in Jenkins
First 10mins from Jenkins online meetup video, https://www.youtube.com/
watch?v=TsWkZLLU-s4
https://www.cloudbees.com/blog/advanced-git-jenkins
General tips for handling large Git repos,
https://www.atlassian.com/blog/git/handle-big-repositories-git
https://larsxschneider.github.io/2016/09/21/large-git-repos

More Related Content

What's hot

DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в Kubernetes
DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в KubernetesDevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в Kubernetes
DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в KubernetesDevOps_Fest
 
@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrbArzumy MD
 
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronBrainhub
 
Learned lessons in a real world project
Learned lessons in a real world projectLearned lessons in a real world project
Learned lessons in a real world projectCodium
 
Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh PrajapatiSession on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh PrajapatiAgile Testing Alliance
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with DockerAnton Egorov
 
2. auto deploy to tomcat on jenkins
2. auto deploy to tomcat on jenkins2. auto deploy to tomcat on jenkins
2. auto deploy to tomcat on jenkinsHuang Bruce
 
WordPress workflow of the future
WordPress workflow of the futureWordPress workflow of the future
WordPress workflow of the futureEli McMakin
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on DockerCraig Trim
 
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS) Par Jean-...
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS)  Par Jean-...XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS)  Par Jean-...
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS) Par Jean-...Publicis Sapient Engineering
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Agile Testing Alliance
 
Introduction to Eclipse Che - Devoxx FR - 2017
Introduction to Eclipse Che - Devoxx FR - 2017Introduction to Eclipse Che - Devoxx FR - 2017
Introduction to Eclipse Che - Devoxx FR - 2017stevanLM
 
How to convince a malware to avoid us
How to convince a malware to avoid usHow to convince a malware to avoid us
How to convince a malware to avoid usCsaba Fitzl
 
CodeIgniter Lab
CodeIgniter LabCodeIgniter Lab
CodeIgniter LabLeo Nguyen
 
Building an in house support team
Building an in house support teamBuilding an in house support team
Building an in house support teamPascal Rapicault
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam Englander
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 
Lightweight development (Lightning talk)
Lightweight development (Lightning talk)Lightweight development (Lightning talk)
Lightweight development (Lightning talk)zroger
 

What's hot (20)

DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в Kubernetes
DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в KubernetesDevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в Kubernetes
DevOps Fest 2020. Роман Орлов. Инфраструктура тестирования в Kubernetes
 
@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb
 
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
 
Learned lessons in a real world project
Learned lessons in a real world projectLearned lessons in a real world project
Learned lessons in a real world project
 
Jenkins auto configureforbranch-php
Jenkins auto configureforbranch-phpJenkins auto configureforbranch-php
Jenkins auto configureforbranch-php
 
Docker
DockerDocker
Docker
 
Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh PrajapatiSession on Selenium 4 : What’s coming our way? by Hitesh Prajapati
Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with Docker
 
2. auto deploy to tomcat on jenkins
2. auto deploy to tomcat on jenkins2. auto deploy to tomcat on jenkins
2. auto deploy to tomcat on jenkins
 
WordPress workflow of the future
WordPress workflow of the futureWordPress workflow of the future
WordPress workflow of the future
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on Docker
 
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS) Par Jean-...
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS)  Par Jean-...XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS)  Par Jean-...
XebiCon'16 : Fastlane : Automatisez votre vie (de développeur iOS) Par Jean-...
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
 
Introduction to Eclipse Che - Devoxx FR - 2017
Introduction to Eclipse Che - Devoxx FR - 2017Introduction to Eclipse Che - Devoxx FR - 2017
Introduction to Eclipse Che - Devoxx FR - 2017
 
How to convince a malware to avoid us
How to convince a malware to avoid usHow to convince a malware to avoid us
How to convince a malware to avoid us
 
CodeIgniter Lab
CodeIgniter LabCodeIgniter Lab
CodeIgniter Lab
 
Building an in house support team
Building an in house support teamBuilding an in house support team
Building an in house support team
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 
Lightweight development (Lightning talk)
Lightweight development (Lightning talk)Lightweight development (Lightning talk)
Lightweight development (Lightning talk)
 

Similar to Jenkins Pipelines for Continuous Delivery

The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellRoberto Reale
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentationbrian_dailey
 
510Lec01-Overview.pptx
510Lec01-Overview.pptx510Lec01-Overview.pptx
510Lec01-Overview.pptxKrosumLabs1
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_languageNico Ludwig
 
Easy deployment & management of cloud apps
Easy deployment & management of cloud appsEasy deployment & management of cloud apps
Easy deployment & management of cloud appsDavid Cunningham
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
Functional Programming with Streams in node.js
Functional Programming with Streams in node.jsFunctional Programming with Streams in node.js
Functional Programming with Streams in node.jsAdam Crabtree
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящееSinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее.toster
 
BUILDING APPS WITH ASYNCIO
BUILDING APPS WITH ASYNCIOBUILDING APPS WITH ASYNCIO
BUILDING APPS WITH ASYNCIOMykola Novik
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administrationvceder
 
Shell scripting - By Vu Duy Tu from eXo Platform SEA
Shell scripting - By Vu Duy Tu from eXo Platform SEAShell scripting - By Vu Duy Tu from eXo Platform SEA
Shell scripting - By Vu Duy Tu from eXo Platform SEAThuy_Dang
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Vincent Batts
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageRené Ribaud
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsDhilipsiva DS
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Program Assignment Process ManagementObjective This program a.docx
Program Assignment  Process ManagementObjective This program a.docxProgram Assignment  Process ManagementObjective This program a.docx
Program Assignment Process ManagementObjective This program a.docxwkyra78
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersAlessandro Sanino
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoMatt Stine
 

Similar to Jenkins Pipelines for Continuous Delivery (20)

The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shell
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 
510Lec01-Overview.pptx
510Lec01-Overview.pptx510Lec01-Overview.pptx
510Lec01-Overview.pptx
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language
 
Easy deployment & management of cloud apps
Easy deployment & management of cloud appsEasy deployment & management of cloud apps
Easy deployment & management of cloud apps
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Functional Programming with Streams in node.js
Functional Programming with Streams in node.jsFunctional Programming with Streams in node.js
Functional Programming with Streams in node.js
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
Sinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящееSinatra: прошлое, будущее и настоящее
Sinatra: прошлое, будущее и настоящее
 
PyCon 2011: IronPython Command Line
PyCon 2011:  IronPython Command LinePyCon 2011:  IronPython Command Line
PyCon 2011: IronPython Command Line
 
BUILDING APPS WITH ASYNCIO
BUILDING APPS WITH ASYNCIOBUILDING APPS WITH ASYNCIO
BUILDING APPS WITH ASYNCIO
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administration
 
Shell scripting - By Vu Duy Tu from eXo Platform SEA
Shell scripting - By Vu Duy Tu from eXo Platform SEAShell scripting - By Vu Duy Tu from eXo Platform SEA
Shell scripting - By Vu Duy Tu from eXo Platform SEA
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming language
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration Tools
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Program Assignment Process ManagementObjective This program a.docx
Program Assignment  Process ManagementObjective This program a.docxProgram Assignment  Process ManagementObjective This program a.docx
Program Assignment Process ManagementObjective This program a.docx
 
The GO Language : From Beginners to Gophers
The GO Language : From Beginners to GophersThe GO Language : From Beginners to Gophers
The GO Language : From Beginners to Gophers
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to Go
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Jenkins Pipelines for Continuous Delivery

  • 3. What’s in it for me? Pipeline helps to, codify build flow divide monolithic build to logical stages bind execution of one or more stages based on previous stage’s result abstract common tasks to shared libraries Learn Groovy DSL (scripted syntax, shared libraries) Declarative syntax follows imperative model Jenkins v2.x + Pipeline suite of plugins Tons and tons of patience to toil, sweat a.k.a. R(ead), A(pply), D(ocument) and S(hare) lots and lots of Pre-requisites https://www.flickr.com/photos/87232391@N00/403119696
  • 4. Getting Started. . . Have a test Jenkins master, playground for trial and error mirror (as close as possible) production instance access to rest of infra or replicate where infra cannot be shared (e.g: artifactory, s3, build agents) mental model of what to do — logical blocks needed, how to tie them up, what can or cannot be done in parallel, archive, notifications. Tooo……ooons of material on the Internet on Jenkins Pipeline
  • 5. Bite the bullet . . . Start writing pipeline as code Start with individual stages, one stage at a time Pipeline syntax and snippet generator Pipeline script in <Version Control> => modify, build, test : repeat Better yet, Replay on the passed or failed job update on the fly, build, test But, but, no Replay for builds failed on Groovy syntax :-(
  • 6. Namaskara… #!groovy node(‘linux’) { // any build agent with label, linux;if left blank, master stage(‘Prep’) { def greet = “Welcome to Pipeline” // variable declaration echo “${greet}” sh “uname -a” def ip_address = sh(returnStdout: true, script: “ifconfig eth0 | grep -i inet | head -1 | awk -F’:’ ‘{print $2}’ | awk -F’ ‘ ‘{print $1}’”).trim() println “Node’s IP address, ip_address” } }
  • 7. Common Gotchas… Pipeline syntax errors DO NOT copy and paste from your editor or from the previous slide Most common: Typos in pipeline code Cautious with usage of Unix tools within Pipeline single, double quotes
  • 8. Got it finally… #!groovy node(‘linux’) { // build agent with label ‘linux’;if left blank, master stage("Prep") { def greet = “Welcome to Pipeline" // variable declaration echo "${greet}" sh "uname -a" sh "'/sbin/ifconfig eth0 | grep -i inet | head -1 | cut -d: -f2 | awk -F' ' '{print $1}' "' } sh step has many avatars 1. sh “command” 2. sh (returnStdout …) 3. sh (returnStatus …) 4. sh followed by three single or double quotes (for variable interpolation) Output from build console log
  • 9. useful links Online examples for various steps… wiki => https://jenkins.io/doc/pipeline/examples/ code => https://github.com/jenkinsci/pipeline-examples/tree/master/ pipeline-examples contribute your’s today, https://github.com/jenkinsci/pipeline-examples Plugins compatible with Pipeline https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md Pipeline resources Syntax reference, https://jenkins.io/doc/book/pipeline/syntax Steps reference, https://jenkins.io/doc/pipeline/steps BlueOcean https://jenkins.io/doc/book/blueocean
  • 10. Handling SCM … Git Have generic service accounts, avoid storing user credentials Jenkins has built-in implementation of Git :-) But, it may not be in sync with generally available version of Git :-( Handling large Git repos in Jenkins First 10mins from Jenkins online meetup video, https://www.youtube.com/ watch?v=TsWkZLLU-s4 https://www.cloudbees.com/blog/advanced-git-jenkins General tips for handling large Git repos, https://www.atlassian.com/blog/git/handle-big-repositories-git https://larsxschneider.github.io/2016/09/21/large-git-repos