SlideShare a Scribd company logo
Jenkins Pipeline
meets Oracle
Oliver Lemm
Rotterdam, 26-MAR-2019
enabling the adaptive enterprise
Key Facts
Independent Technology House
with Cross-Industry Expertise
Headquarter
Ratingen
230 employees
Founded
1994
Top Company for Trainees &
Students
Privately-Owned
Corporation
Oracle Platinum
Partner
Microsoft Gold
Partner33 Mio. Euro
Revenue in 2018
Germany‘s number
1 in APEX
Branches
Frankfurt & Cologne
2
3
about me
 Oliver Lemm, Business Unit Leader APEX
 Born 1980, married, four Children, Place of Residenz Dinslaken
 since 2.2007 at the MT AG in Ratingen
 Working with APEX since 2007
 Leading in Distribution/Marketing/Delivery for APEX Projects
 https://apex.mt-ag.com
 Doing presentations at DOAG Conference, APEX World, DOAG APEX Connect & ODTUG
KScope
1. Introduction in Jenkins
2. What is a Pipeline
3. Creating a Pipeline
4. Jenkinsfile
5. Moving from Jenkins Jobs to Pipeline
6. Complex Pipeline
7. After Jenkins Pipeline
4
Agenda
5
https://jenkins.io/
Jenkins
“a leightweight tool which is a GUI for your automated processes”
“used for continuous integration and continuous delivery”
“easy to integrate version control”
“free software”
“can be compared with gitlab or atlassian bamboo”
6
what is Jenkins?
Job
“declarative” defined process
build step
calling a batch or running a single http request
one or more build steps are part of a job
Build
every time running a process results in a Build
7
keywords in Jenkins …
8
Demo
exporting & importing APEX applications
generating patchfiles for your application/schema objects
using datapump
running backend & frontend tests
creating users, tablespaces, grants
deploying scripts to different databases
9
using Jenkins in Oracle for …
defining one or multiple jobs in a script
Domain Specific Language (DSL)
pipeline output
10
what is Pipeline?
durable
pausable
versatile
extensible
versionable
11
advantages of pipeline are …
comparing Pipeline vs Job
12
new item “pipeline”
creating a pipeline (1)
13
creating a pipeline (2)
pipeline {
agent {
label {
label ""
customWorkspace "C:/jenkins_projects/cicd"
}
}
stages {
stage('Export APEX App') {
steps {
withCredentials([usernamePassword(credentialsId: 'db_schema_demo_dev',
passwordVariable: 'db_schema_pw', usernameVariable: 'db_schema_user')]) {
bat '''cd trunkapex
..batchexport_apex_app_sqlcl %db_schema_user% %db_schema_pw% pdb1 %app_id%'''
}
}
}
}
14
simple example
Jenkinsfile
agent any
agent none
agent { label “windows” }
agent {
customWorkspace “c:/Jenkins_projects/cicd”
}
agent {
docker {
image “maven:3-alpine”
}
}
15
agent
Jenkinsfile
1) all stages / steps will run on any agent
2) each stage will run on it’s own agent
3) for parallel processes multiple agents can
be used and named
4) running jobs in a special workspace the
agent should be defined with a
customWorkspace
5) using docker you can define different
environments based on docker images
 every pipeline must be defined in stages
 every “stages” can have 1-x stage
 a stage is a functional bracket
 every stage is visible in the Jenkins output
16
stage / stages
Jenkinsfile
stages {
stage ("Prepare") { ... }
stage("PROD - Export App") { ... }
stage("PROD - Datapump Export") { ... }
stage("Move Dumps") { ... }
stage("TEST - Delete Old DB Objects") { ... }
stage("TEST - Datapump Import") { ... }
stage("TEST - Import App") {...}
}
 a step is a technical “bracket”
 a step is inside a stage
 every stage can have 1-x steps, mostly one stage
has 1 step
 a step can be a batch or shell or even a plugin call
https://jenkins.io/doc/pipeline/steps/
17
step
Jenkinsfile
stages {
stage(“run my batch“) {
steps {
bat '''export_apex_app_sqlcl'''
}
}
}
18
Snippet Generator
Jenkinsfile
 using passwords in a save way
 passwords itself are safed encrypted inside Jenkins
 credentials are only useable inside the “brackets”
 the password ID should be defined and not a random given number
 passwords are not readable inside the command line
19
credentials
Jenkinsfile
steps {
withCredentials([usernamePassword(credentialsId: 'db_schema_demo_dev',
passwordVariable: 'db_schema_pw',
usernameVariable: 'db_schema_user')]) {
bat '''cd trunkapex
..batchexport_apex_app_sqlcl %db_schema_user% %db_schema_pw% pdb1 %app_id%'''
}
}
20
database or other technical users
Credentials
 searching for error after each stage
 setting build “FAILURE”, “UNSTABLE” or “SUCCESS”
21
errorhandling by stage
Jenkinsfile
stage("Create Grants and Synonyms") {
steps {
bat 'REM Create Grants and Synonyms STARTED'
bat '''batchcreate_grants_synonyms'''
bat 'REM Create Grants and Synonyms FINISHED'
script {
String[] errors = ["ORA-"]
checkConsoleOutputAfterBuildStep("Create Grants and Synonyms STARTED",
"Create Grants and Synonyms FINISHED", errors,
"Create Grants and Synonyms Failed!", "FAILURE")
}
}
}
 Post processing after
every stage
 Overall one post
processing at the end of
the pipeline
22
errorhandling by pipeline
Jenkinsfile
pipeline {
stages {
stage('do something') { …
post {
success { bsNotifySuccessful("Set up Jobcontrol Environment") }
unstable { bsNotifyUnstable("Set up Jobcontrol Environment") }
aborted { bsNotifyAborted("Set up Jobcontrol Environment") }
failure { bsNotifyFailed("Set up Jobcontrol Environment") }
}
}
post { success { notifySuccessful() }
unstable { notifyUnstable() }
aborted { notifyAborted() }
failure { notifyFailed() }
}
}
}
 running steps by condition
 using conditions for environments
23
conditional
Jenkinsfile
stage(‘conditional by environment') {
agent label:'test-node' when {
environment name: 'NAME', value: 'this'
}
steps {
echo 'run only if the env name and value
matches'
}
}
24
start from stage
Pipeline
 is groovy code
 validate code with pipeline Linter
25
Jenkinsfile
pipeline {
agent {
label {
label "„
customWorkspace "C:/projects/uit_fpp/svn„
}
}
stages {
stage('110 - Drop Users and Tablespaces') {
steps {
script {
def drop_users_and_tablespaces = build job: '110_drop_users_and_tablespaces',
parameters: [string(name: 'environment', value: "${params.environment}"),
string(name: 'start', value: 'Ja')]
currentBuild.result = drop_users_and_tablespaces.result
}
}
}
stage('120 - Create Users and Tablespaces') { … }
}
}
26
pipeline starting standard Jenkins jobs
moving from Jobs to Pipeline
27
overview
Looking into a complex scenario
DEMO
28
logs by stage
Looking into a complex scenario
29
build history, trend and timeline
Looking into a complex scenario
 … more flexible
 … code
 … versionable
 … not declarative any more
 … still jenkins
30
Pipeline is
Conclusion
pictures by Jenkins.io
31
Blue Ocean - https://jenkins.io/projects/blueocean/
and after Pipeline (1)
32
Jenkins X
and after Pipeline (2)
https://jenkins.io/projects/jenkins-x
33
APEX Migration Workshop - https://apex.mt-ag.com/apex/f?p=276:3
… after APEX World (1)
34
APEX Connect 2019 - https://apex.doag.org
… after APEX World (2)
@OliverLemm
https://www.linkedin.com/in/oliverlemm
https://www.xing.com/profile/Oliver_Lemm
https://oliverlemm.blogspot.com/
enabling the adaptive enterprise

More Related Content

PDF
Adop patching gotchas ppt
PDF
Introduction to MuleSoft
PDF
Oracle Application Express (APEX) and Microsoft Sharepoint integration
PDF
Application Architecture: The Next Wave | MuleSoft
PDF
Comparison of ACFS and DBFS
PPTX
Oracle BI publisher intro
PPTX
Oracle Data Integrator
PDF
Introduction to flutter
Adop patching gotchas ppt
Introduction to MuleSoft
Oracle Application Express (APEX) and Microsoft Sharepoint integration
Application Architecture: The Next Wave | MuleSoft
Comparison of ACFS and DBFS
Oracle BI publisher intro
Oracle Data Integrator
Introduction to flutter

What's hot (20)

PPT
Mulesoft ppt
PDF
Oracle Enterprise Manager Cloud Control 13c for DBAs
PPT
Web Development In Oracle APEX
PPT
Oracle Weblogic for EBS and obiee (R12.2)
PDF
Enterprise manager 13c
PPTX
Batch Processing with Mule 4
PDF
High Availability for OpenStack
PDF
Performing a successful technical debt assessment in Salesforce
PPTX
Why oracle data guard new features in oracle 18c, 19c
PPTX
Mulesoft Connections to different companies, and different services
PDF
Introduction to Kong API Gateway
PDF
Mastering PostgreSQL Administration
 
PPTX
Apache Airflow | What Is An Operator
PPTX
Benefits of integration with the Mulesoft Anypoint Platform
PDF
How to use source control with apex?
PPTX
Oracle EBS R12.2 - Deployment and System Administration
PPTX
Oracle Database Performance Tuning Basics
PPTX
Automate DBA Tasks With Ansible
PPT
PPT
Introduction to Google APIs
Mulesoft ppt
Oracle Enterprise Manager Cloud Control 13c for DBAs
Web Development In Oracle APEX
Oracle Weblogic for EBS and obiee (R12.2)
Enterprise manager 13c
Batch Processing with Mule 4
High Availability for OpenStack
Performing a successful technical debt assessment in Salesforce
Why oracle data guard new features in oracle 18c, 19c
Mulesoft Connections to different companies, and different services
Introduction to Kong API Gateway
Mastering PostgreSQL Administration
 
Apache Airflow | What Is An Operator
Benefits of integration with the Mulesoft Anypoint Platform
How to use source control with apex?
Oracle EBS R12.2 - Deployment and System Administration
Oracle Database Performance Tuning Basics
Automate DBA Tasks With Ansible
Introduction to Google APIs
Ad

Similar to Jenkins Pipeline meets Oracle (20)

PPTX
Pipeline as code - new feature in Jenkins 2
PDF
(Declarative) Jenkins Pipelines
PDF
Implementing CI CD UiPath Using Jenkins Plugin
PDF
Jenkins Declarative Pipelines 101
PDF
Jenkins Pipelines
PPTX
Jenkins pipeline as code
ODP
Pipeline based deployments on Jenkins
PPTX
Jenkins2 - Coding Continuous Delivery Pipelines
PDF
413450-rc218-cdw-jenkins-workflow
PPTX
Jenkins days workshop pipelines - Eric Long
PDF
Pipeline 101 Lorelei Mccollum
PPTX
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
PDF
Atlanta Jenkins Area Meetup October 22nd 2015
PPTX
Pipeline as code using Jenkins -Ministry of Testing
PDF
DOD 2016 - Sebastian Krzyszkowiak - Jenkins: The Pipeline
PPTX
Continuous Integration With Jenkins Docker SQL Server
PPTX
CICD with Jenkins
PPTX
What Is Jenkins? Features and How It Works
PDF
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
PDF
Jenkins pipeline -- Gentle Introduction
Pipeline as code - new feature in Jenkins 2
(Declarative) Jenkins Pipelines
Implementing CI CD UiPath Using Jenkins Plugin
Jenkins Declarative Pipelines 101
Jenkins Pipelines
Jenkins pipeline as code
Pipeline based deployments on Jenkins
Jenkins2 - Coding Continuous Delivery Pipelines
413450-rc218-cdw-jenkins-workflow
Jenkins days workshop pipelines - Eric Long
Pipeline 101 Lorelei Mccollum
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
Atlanta Jenkins Area Meetup October 22nd 2015
Pipeline as code using Jenkins -Ministry of Testing
DOD 2016 - Sebastian Krzyszkowiak - Jenkins: The Pipeline
Continuous Integration With Jenkins Docker SQL Server
CICD with Jenkins
What Is Jenkins? Features and How It Works
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins pipeline -- Gentle Introduction
Ad

More from Oliver Lemm (20)

PDF
Qualitätssicherung für APEX Anwendungen.pdf
PDF
Qualitätsstandards in der Datenbankentwicklung.pdf
PDF
APEX Page Items in detail
PDF
confirm & alert
PDF
APEX richtig installieren und konfigurieren
PDF
APEX Migration
PDF
Jenkins Pipelines Advanced
PDF
From Dev to Ops
PDF
Das Universal Theme in APEX 19
PPTX
REST mit APEX 18.1
PDF
Schritt für Schritt ins Grid
PDF
Migration ins Universal Theme 1.1
PPTX
Mastering Universal Theme with corporate design from Union Investment
PPTX
Mastering Universal Theme with corporate design from union investment
PPTX
Jetlag - Oracle Jet und APEX
PPTX
Wieder verschätzt?
PDF
Komplexe Daten mit Oracle Jet einfach aufbereitet
PDF
Mastering Universal Theme with corporate design from Union Investment
PDF
Echtzeitvisualisierung von Twitter & Co
PPTX
Enterprise APEX
Qualitätssicherung für APEX Anwendungen.pdf
Qualitätsstandards in der Datenbankentwicklung.pdf
APEX Page Items in detail
confirm & alert
APEX richtig installieren und konfigurieren
APEX Migration
Jenkins Pipelines Advanced
From Dev to Ops
Das Universal Theme in APEX 19
REST mit APEX 18.1
Schritt für Schritt ins Grid
Migration ins Universal Theme 1.1
Mastering Universal Theme with corporate design from Union Investment
Mastering Universal Theme with corporate design from union investment
Jetlag - Oracle Jet und APEX
Wieder verschätzt?
Komplexe Daten mit Oracle Jet einfach aufbereitet
Mastering Universal Theme with corporate design from Union Investment
Echtzeitvisualisierung von Twitter & Co
Enterprise APEX

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Review of recent advances in non-invasive hemoglobin estimation
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine Learning_overview_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Dropbox Q2 2025 Financial Results & Investor Presentation
The AUB Centre for AI in Media Proposal.docx
A comparative analysis of optical character recognition models for extracting...
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Jenkins Pipeline meets Oracle

  • 1. Jenkins Pipeline meets Oracle Oliver Lemm Rotterdam, 26-MAR-2019 enabling the adaptive enterprise
  • 2. Key Facts Independent Technology House with Cross-Industry Expertise Headquarter Ratingen 230 employees Founded 1994 Top Company for Trainees & Students Privately-Owned Corporation Oracle Platinum Partner Microsoft Gold Partner33 Mio. Euro Revenue in 2018 Germany‘s number 1 in APEX Branches Frankfurt & Cologne 2
  • 3. 3 about me  Oliver Lemm, Business Unit Leader APEX  Born 1980, married, four Children, Place of Residenz Dinslaken  since 2.2007 at the MT AG in Ratingen  Working with APEX since 2007  Leading in Distribution/Marketing/Delivery for APEX Projects  https://apex.mt-ag.com  Doing presentations at DOAG Conference, APEX World, DOAG APEX Connect & ODTUG KScope
  • 4. 1. Introduction in Jenkins 2. What is a Pipeline 3. Creating a Pipeline 4. Jenkinsfile 5. Moving from Jenkins Jobs to Pipeline 6. Complex Pipeline 7. After Jenkins Pipeline 4 Agenda
  • 6. “a leightweight tool which is a GUI for your automated processes” “used for continuous integration and continuous delivery” “easy to integrate version control” “free software” “can be compared with gitlab or atlassian bamboo” 6 what is Jenkins?
  • 7. Job “declarative” defined process build step calling a batch or running a single http request one or more build steps are part of a job Build every time running a process results in a Build 7 keywords in Jenkins …
  • 9. exporting & importing APEX applications generating patchfiles for your application/schema objects using datapump running backend & frontend tests creating users, tablespaces, grants deploying scripts to different databases 9 using Jenkins in Oracle for …
  • 10. defining one or multiple jobs in a script Domain Specific Language (DSL) pipeline output 10 what is Pipeline?
  • 14. pipeline { agent { label { label "" customWorkspace "C:/jenkins_projects/cicd" } } stages { stage('Export APEX App') { steps { withCredentials([usernamePassword(credentialsId: 'db_schema_demo_dev', passwordVariable: 'db_schema_pw', usernameVariable: 'db_schema_user')]) { bat '''cd trunkapex ..batchexport_apex_app_sqlcl %db_schema_user% %db_schema_pw% pdb1 %app_id%''' } } } } 14 simple example Jenkinsfile
  • 15. agent any agent none agent { label “windows” } agent { customWorkspace “c:/Jenkins_projects/cicd” } agent { docker { image “maven:3-alpine” } } 15 agent Jenkinsfile 1) all stages / steps will run on any agent 2) each stage will run on it’s own agent 3) for parallel processes multiple agents can be used and named 4) running jobs in a special workspace the agent should be defined with a customWorkspace 5) using docker you can define different environments based on docker images
  • 16.  every pipeline must be defined in stages  every “stages” can have 1-x stage  a stage is a functional bracket  every stage is visible in the Jenkins output 16 stage / stages Jenkinsfile stages { stage ("Prepare") { ... } stage("PROD - Export App") { ... } stage("PROD - Datapump Export") { ... } stage("Move Dumps") { ... } stage("TEST - Delete Old DB Objects") { ... } stage("TEST - Datapump Import") { ... } stage("TEST - Import App") {...} }
  • 17.  a step is a technical “bracket”  a step is inside a stage  every stage can have 1-x steps, mostly one stage has 1 step  a step can be a batch or shell or even a plugin call https://jenkins.io/doc/pipeline/steps/ 17 step Jenkinsfile stages { stage(“run my batch“) { steps { bat '''export_apex_app_sqlcl''' } } }
  • 19.  using passwords in a save way  passwords itself are safed encrypted inside Jenkins  credentials are only useable inside the “brackets”  the password ID should be defined and not a random given number  passwords are not readable inside the command line 19 credentials Jenkinsfile steps { withCredentials([usernamePassword(credentialsId: 'db_schema_demo_dev', passwordVariable: 'db_schema_pw', usernameVariable: 'db_schema_user')]) { bat '''cd trunkapex ..batchexport_apex_app_sqlcl %db_schema_user% %db_schema_pw% pdb1 %app_id%''' } }
  • 20. 20 database or other technical users Credentials
  • 21.  searching for error after each stage  setting build “FAILURE”, “UNSTABLE” or “SUCCESS” 21 errorhandling by stage Jenkinsfile stage("Create Grants and Synonyms") { steps { bat 'REM Create Grants and Synonyms STARTED' bat '''batchcreate_grants_synonyms''' bat 'REM Create Grants and Synonyms FINISHED' script { String[] errors = ["ORA-"] checkConsoleOutputAfterBuildStep("Create Grants and Synonyms STARTED", "Create Grants and Synonyms FINISHED", errors, "Create Grants and Synonyms Failed!", "FAILURE") } } }
  • 22.  Post processing after every stage  Overall one post processing at the end of the pipeline 22 errorhandling by pipeline Jenkinsfile pipeline { stages { stage('do something') { … post { success { bsNotifySuccessful("Set up Jobcontrol Environment") } unstable { bsNotifyUnstable("Set up Jobcontrol Environment") } aborted { bsNotifyAborted("Set up Jobcontrol Environment") } failure { bsNotifyFailed("Set up Jobcontrol Environment") } } } post { success { notifySuccessful() } unstable { notifyUnstable() } aborted { notifyAborted() } failure { notifyFailed() } } } }
  • 23.  running steps by condition  using conditions for environments 23 conditional Jenkinsfile stage(‘conditional by environment') { agent label:'test-node' when { environment name: 'NAME', value: 'this' } steps { echo 'run only if the env name and value matches' } }
  • 25.  is groovy code  validate code with pipeline Linter 25 Jenkinsfile
  • 26. pipeline { agent { label { label "„ customWorkspace "C:/projects/uit_fpp/svn„ } } stages { stage('110 - Drop Users and Tablespaces') { steps { script { def drop_users_and_tablespaces = build job: '110_drop_users_and_tablespaces', parameters: [string(name: 'environment', value: "${params.environment}"), string(name: 'start', value: 'Ja')] currentBuild.result = drop_users_and_tablespaces.result } } } stage('120 - Create Users and Tablespaces') { … } } } 26 pipeline starting standard Jenkins jobs moving from Jobs to Pipeline
  • 27. 27 overview Looking into a complex scenario DEMO
  • 28. 28 logs by stage Looking into a complex scenario
  • 29. 29 build history, trend and timeline Looking into a complex scenario
  • 30.  … more flexible  … code  … versionable  … not declarative any more  … still jenkins 30 Pipeline is Conclusion pictures by Jenkins.io
  • 31. 31 Blue Ocean - https://jenkins.io/projects/blueocean/ and after Pipeline (1)
  • 32. 32 Jenkins X and after Pipeline (2) https://jenkins.io/projects/jenkins-x
  • 33. 33 APEX Migration Workshop - https://apex.mt-ag.com/apex/f?p=276:3 … after APEX World (1)
  • 34. 34 APEX Connect 2019 - https://apex.doag.org … after APEX World (2)