SlideShare a Scribd company logo
How to Easily Build a Git-Based CI/CD
Pipeline for your APIs with Jenkins?
October 19, 2020
Hello!
Wasura Wattearachchi
Software Engineer
wasura@wso2.com
Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs
(Webinar - September 30, 2020)
Click here to access
Using API Controller to Manage API Artifacts Across Environments
(Screencast - October 2, 2020)
Click here to access
Related Screencasts and Webinars
3
● Role of WSO2 API Controller in WSO2 API Manager
● How does WSO2 API Controller Support CI/CD?
● Demonstration
○ Steps
○ Use Cases
Content on Today’s Screencast
4
Role of WSO2 API Controller in WSO2
API Manager
WSO2 API Controller + WSO2 API Manager
6
WSO2 API Manager provides the facility to do Continuous Integration (CI) and
Continuous Deployment (CD) for API artefacts (APIs, API Products and
Applications) using the WSO2 API Controller (apictl).
WSO2 API Controller is a command-line tool for managing API Manager
environments, listing API artefacts, creating API projects, importing and exporting
API artefacts, generating tokens for APIs and API products for testing purposes, etc.
How does WSO2 API Controller Support
CI/CD?
8
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
9
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
10
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
11
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
12
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
13
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
14
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
15
CI/CD + WSO2 API Controller
Commit
dev branch dev pipeline
apictl
master branch prod pipeline
apictl
Merge PR
Demonstration
Prerequisites
● Download WSO2 API Manager 3.2.0 (Refer [1])
● Setup WSO2 API Controller (You need to have APICTL 3.2.0 since Git
Integration has been introduced in this release. Refer [2])
● Setup up Jenkins (Refer [3])
● Install Git (Since we will be using Git as the version control system. Refer [4])
[1] https://apim.docs.wso2.com/en/latest/install-and-setup/install/installing-the-product/installing-the-product
[2] https://apim.docs.wso2.com/en/latest/learn/api-controller/getting-started-with-wso2-api-controller/#getting-
started-with-wso2-api-controller
[3] https://www.jenkins.io/doc/book/installing
[4] https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
17
18
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
Use Cases
1. Create an API project using DevFirst Approach and deploy in lower environment
2. Deploy the same API Project in the upper environment
3. Automatic rollback due to an erroneous change
19
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
20
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
21
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
22
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
1. Checkout to the master
branch
2. Commit the Jenkinsfile
(Make sure to change the
port number and the
environment name in the
commands accordingly)
1. Give a name to the pipeline
(CICD-PIPELINE-PROD)
2. Give the Definition as Pipeline script
from SCM.
3. Make sure to set SCM as Git
4. Enter the Repository URL
5. Set Branches to build as */master
6. For the ScriptPath give JenkinsFile
1. Commit the vcs.yaml file
23
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
Use Cases
1. Create an API project using DevFirst Approach and deploy in lower environment
2. Deploy the same API Project in the upper environment
3. Automatic rollback due to an erroneous change
24
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
Use Cases
1. Create an API project using DevFirst Approach and deploy in lower environment
2. Deploy the same API Project in the upper environment
3. Automatic rollback due to an erroneous change
25
Steps
Step 1 - Setup a Git
Repository
Step 2 - Execute
“apictl vcs init”
inside the Git repo
Step 3 - Setup
Jenkins pipeline
Use Cases
1. Create an API project using DevFirst Approach and deploy in lower environment
2. Deploy the same API Project in the upper environment
3. Automatic rollback due to an erroneous change
Useful Links
26
wasuradananjith/screencast-ci-cd-git-integration
https://github.com/wasuradananjith/screencast-ci-cd-git-integration
Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs
(Webinar - September 30, 2020)
Using API Controller to Manage API Artifacts Across Environments
(Screencast - October 2, 2020)
WSO2 Documentation - WSO2 API Controller
https://apim.docs.wso2.com/en/latest/learn/api-controller/getting-started-with-wso2-api-controller
wso2.com
Thanks!

More Related Content

PDF
WWDC 2016 Personal Recollection
PDF
WWDC 2016 Personal Recollection
PDF
Griffon Update Gr8conf 2013
PPTX
A painless self-hosted Git service: Gitea
PPTX
Introduction to Gitea with Drone
PDF
Why you can't ignore GitLab
PDF
Git Series. Episode 3. Git Flow and Github-Flow
PPTX
Up GitLab Presentation 2015
WWDC 2016 Personal Recollection
WWDC 2016 Personal Recollection
Griffon Update Gr8conf 2013
A painless self-hosted Git service: Gitea
Introduction to Gitea with Drone
Why you can't ignore GitLab
Git Series. Episode 3. Git Flow and Github-Flow
Up GitLab Presentation 2015

What's hot (20)

PPTX
Git Lab Introduction
PDF
Gradle 2.0 and beyond (GREACH 2015)
PDF
Git-flow workflow and pull-requests
PPTX
Git in 10 minutes (WordCamp Europe 2017)
PDF
GitOps with Gitkube
PPTX
Nextcloud Android Development Process
PPTX
PPTX
Gerrit Code Review with GitHub plugin
PDF
Introducing GitLab (June 2018)
PDF
PPTX
Angular for rookies MS TechDays 2017
PPTX
Git & Github
PPTX
Git flow
PPT
Git workflows presentation
PPT
Flex and .NET Integration
PDF
Git workflows
PDF
GitLab as an Alternative Development Platform for Github.com
PPTX
Gerrit is Getting Native with RPM, Deb and Docker
PPTX
CNCF: Cross-cloud CI Dashboard v1.0.0 Release 01-26-2018
PDF
Open Source Contributions - Alsey Coleman Miller
Git Lab Introduction
Gradle 2.0 and beyond (GREACH 2015)
Git-flow workflow and pull-requests
Git in 10 minutes (WordCamp Europe 2017)
GitOps with Gitkube
Nextcloud Android Development Process
Gerrit Code Review with GitHub plugin
Introducing GitLab (June 2018)
Angular for rookies MS TechDays 2017
Git & Github
Git flow
Git workflows presentation
Flex and .NET Integration
Git workflows
GitLab as an Alternative Development Platform for Github.com
Gerrit is Getting Native with RPM, Deb and Docker
CNCF: Cross-cloud CI Dashboard v1.0.0 Release 01-26-2018
Open Source Contributions - Alsey Coleman Miller
Ad

Similar to WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your APIs with Jenkins? (20)

PDF
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
PDF
Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs
PPTX
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
PDF
Continuous Integration using Jenkins with Python
PPTX
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
PPTX
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
PPTX
CICD with Jenkins
PDF
Atlanta Jenkins Area Meetup October 22nd 2015
PDF
Jenkins Pipelines
PDF
Continuous delivery with jenkins pipelines (@devfest Vienna)
PDF
413450-rc218-cdw-jenkins-workflow
DOCX
Manoj Kolhe - Setup GitHub with Jenkins on Amazon Cloud - End-to-end Automation
PPTX
Jenkins workflows and Best Practices
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
PDF
Agile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
PPTX
Continuous Integration with Jenkins and Java EE
PPTX
2015-ghci-presentation-git_gerritJenkins_final
PPTX
Jenkins days workshop pipelines - Eric Long
PDF
CI, CD and Jenkins 2
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Continuous Integration using Jenkins with Python
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
CICD with Jenkins
Atlanta Jenkins Area Meetup October 22nd 2015
Jenkins Pipelines
Continuous delivery with jenkins pipelines (@devfest Vienna)
413450-rc218-cdw-jenkins-workflow
Manoj Kolhe - Setup GitHub with Jenkins on Amazon Cloud - End-to-end Automation
Jenkins workflows and Best Practices
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Agile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
Continuous Integration with Jenkins and Java EE
2015-ghci-presentation-git_gerritJenkins_final
Jenkins days workshop pipelines - Eric Long
CI, CD and Jenkins 2
Ad

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
top salesforce developer skills in 2025.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
System and Network Administration Chapter 2
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
System and Network Administraation Chapter 3
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Transform Your Business with a Software ERP System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
L1 - Introduction to python Backend.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Odoo Companies in India – Driving Business Transformation.pdf
Operating system designcfffgfgggggggvggggggggg
top salesforce developer skills in 2025.pdf
Odoo POS Development Services by CandidRoot Solutions
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms I-SECS-1021-03
Softaken Excel to vCard Converter Software.pdf
System and Network Administration Chapter 2
2025 Textile ERP Trends: SAP, Odoo & Oracle
System and Network Administraation Chapter 3
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Understanding Forklifts - TECH EHS Solution
Transform Your Business with a Software ERP System
Which alternative to Crystal Reports is best for small or large businesses.pdf
history of c programming in notes for students .pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
wealthsignaloriginal-com-DS-text-... (1).pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your APIs with Jenkins?

  • 1. How to Easily Build a Git-Based CI/CD Pipeline for your APIs with Jenkins? October 19, 2020
  • 3. Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs (Webinar - September 30, 2020) Click here to access Using API Controller to Manage API Artifacts Across Environments (Screencast - October 2, 2020) Click here to access Related Screencasts and Webinars 3
  • 4. ● Role of WSO2 API Controller in WSO2 API Manager ● How does WSO2 API Controller Support CI/CD? ● Demonstration ○ Steps ○ Use Cases Content on Today’s Screencast 4
  • 5. Role of WSO2 API Controller in WSO2 API Manager
  • 6. WSO2 API Controller + WSO2 API Manager 6 WSO2 API Manager provides the facility to do Continuous Integration (CI) and Continuous Deployment (CD) for API artefacts (APIs, API Products and Applications) using the WSO2 API Controller (apictl). WSO2 API Controller is a command-line tool for managing API Manager environments, listing API artefacts, creating API projects, importing and exporting API artefacts, generating tokens for APIs and API products for testing purposes, etc.
  • 7. How does WSO2 API Controller Support CI/CD?
  • 8. 8 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 9. 9 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 10. 10 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 11. 11 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 12. 12 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 13. 13 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 14. 14 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 15. 15 CI/CD + WSO2 API Controller Commit dev branch dev pipeline apictl master branch prod pipeline apictl Merge PR
  • 17. Prerequisites ● Download WSO2 API Manager 3.2.0 (Refer [1]) ● Setup WSO2 API Controller (You need to have APICTL 3.2.0 since Git Integration has been introduced in this release. Refer [2]) ● Setup up Jenkins (Refer [3]) ● Install Git (Since we will be using Git as the version control system. Refer [4]) [1] https://apim.docs.wso2.com/en/latest/install-and-setup/install/installing-the-product/installing-the-product [2] https://apim.docs.wso2.com/en/latest/learn/api-controller/getting-started-with-wso2-api-controller/#getting- started-with-wso2-api-controller [3] https://www.jenkins.io/doc/book/installing [4] https://git-scm.com/book/en/v2/Getting-Started-Installing-Git 17
  • 18. 18 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline Use Cases 1. Create an API project using DevFirst Approach and deploy in lower environment 2. Deploy the same API Project in the upper environment 3. Automatic rollback due to an erroneous change
  • 19. 19 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline
  • 20. 20 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline
  • 21. 21 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline
  • 22. 22 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline 1. Checkout to the master branch 2. Commit the Jenkinsfile (Make sure to change the port number and the environment name in the commands accordingly) 1. Give a name to the pipeline (CICD-PIPELINE-PROD) 2. Give the Definition as Pipeline script from SCM. 3. Make sure to set SCM as Git 4. Enter the Repository URL 5. Set Branches to build as */master 6. For the ScriptPath give JenkinsFile 1. Commit the vcs.yaml file
  • 23. 23 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline Use Cases 1. Create an API project using DevFirst Approach and deploy in lower environment 2. Deploy the same API Project in the upper environment 3. Automatic rollback due to an erroneous change
  • 24. 24 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline Use Cases 1. Create an API project using DevFirst Approach and deploy in lower environment 2. Deploy the same API Project in the upper environment 3. Automatic rollback due to an erroneous change
  • 25. 25 Steps Step 1 - Setup a Git Repository Step 2 - Execute “apictl vcs init” inside the Git repo Step 3 - Setup Jenkins pipeline Use Cases 1. Create an API project using DevFirst Approach and deploy in lower environment 2. Deploy the same API Project in the upper environment 3. Automatic rollback due to an erroneous change
  • 26. Useful Links 26 wasuradananjith/screencast-ci-cd-git-integration https://github.com/wasuradananjith/screencast-ci-cd-git-integration Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs (Webinar - September 30, 2020) Using API Controller to Manage API Artifacts Across Environments (Screencast - October 2, 2020) WSO2 Documentation - WSO2 API Controller https://apim.docs.wso2.com/en/latest/learn/api-controller/getting-started-with-wso2-api-controller