1
Oliver Lemm - DOAG 2019
Jenkins Pipelines
Advanced
2
Unsere Hard Facts
Zertifizierter
Partner von
Oracle
Microsoft
280
Beschäftigte
Inhabergeführt
Ausbildungsbetrieb
Partner im
dualen Studium
Branchen-
übergreifend
Herstellerneutral
Hauptsitz
Ratingen
Niederlassungen
Frankfurt am Main
Köln
Dortmund
München
Gründung
1994
33 Mio. Euro
Umsatz
>100 Kunden
Ihr Partner für den digitalen Wandel
Individuelle IT-Lösungen aus einer Hand
4
Oliver Lemm
• Business Unit Leader APEX @ MT AG
• Architect, Project Leader, Developer
5
Agenda
• Jenkins Pipelines
• Jenkinsfile
• Best Practices
• Future
6
what is a Pipeline?
doing multiple steps in one “job”
Domain Specific Language (DSL)
pipeline output
7
pipeline vs standard Job
durable - robust
advantages of pipeline are
pausable - pausierbar
versatile - vielseitig
extensible - erweiterbar
versionable - versionierbar
8
creating a pipeline (1)
new Item „pipeline“
9
creating a pipeline (2)
10
Jenkinsfile
simple example
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%'''
}
}
}
}
11
Jenkinsfile
output
pipeline {
agent {…}
stages {
stage('Export APEX App') {…}
stage('Commit to trunk') {…}
stage('Import APEX App') {…}
}
}
12
Jenkinsfile vs inline script
both
• groovy Syntax
Jenkinsfile
• Versionable
• reuseable
Script
• Snippet Generator
• easier to use
13
Pipelines & Jobs
Jobs are reuseable in pipelines
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') { … }
}
}
14
Workspace / “Arbeitsbereich”
• one repository by project
• less space
• less traffic
• faster
• Workspace not below “jobs”
…
agent {
label {
label ""
customWorkspace "C:/jenkins_projects/cicd"
}
}
…
15
Passwords
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%''‚
}}}
stage('Commit to trunk') {
steps {
withCredentials([usernamePassword(credentialsId: '8a1d2bde-19e2-4a63-be00-f1145a8bdfe3',
passwordVariable: 'svn_password', usernameVariable: 'svn_username')]) {
bat '''cd trunkapex
svn --username=%svn_username% --password=%svn_password% add f%app_id%.sql –force
svn --username=%svn_username% --password=%svn_password% commit -m "automatic commit from
Jenkins" f%app_id%.sql''‚
}}}
with Credentials Binding Plugin
16
Errorhandling
basic
findText regexp: '<regular expression>', fileSet: '<file set>‘
check the console log:
findText regexp: '<regular expression>', fileSet: '<file set>', alsoCheckConsoleOutput: true
only check console:
findText regexp: '<regular expression>', alsoCheckConsoleOutput: true
mark success, warning or failure use succeedIfFound, unstableIfFound, or notBuiltIfFound:
findText regexp: '<regular expression>, alsoCheckConsoleOutput: true, unstableIfFound: true
with Text Finder plugin (since Version 1.11)
17
Errorhandling
stage("Install all QS Packages") {
steps {
bat 'REM -----Install all QS Packages STARTED-----'
bat '''cd trunk
batchinstall_qs_objects batchaccount_data_%environment%.txt''‚
bat 'REM -----Install all QS Packages FINISHED-----'
script {
String[] errors = ["ORA-", "SP2-"]
String[] warnings = ["WARNING"]
checkConsoleOutputAfterBuildStep("-----Install all QS Packages STARTED-----",
"-----Install all QS Packages FINISHED-----",
errors, "Install all QS Packages Failed!", "FAILURE")
checkConsoleOutputAfterBuildStep("-----Install all QS Packages STARTED-----",
"-----Install all QS Packages FINISHED-----",
warnings, "Install all QS Packages has warnings!", "UNSTABLE")
}}}
custom plugin
18
Support multiple Environments
One Pipelinejob for multiple instances
• only one pipeline to maintain
One Pipelinejob for every instance
• less parameters
• automation possible
• see when last time the environment was updated
• see which environment is successfully patched
one Jenkinsfile is used for …
19
Parameters
• Impdp_source_environment
=> which base datapump file to use?
• Version
=> which version to install?
• Impdp_version
=> what is the version of the dataump file?
• run_install_script_pre_version
=> any script which has to run after import
the dump`?
20
Logs
• logs are generated every installation
• logs are save inside Source Control Management
• logs are related to the release
• logs are also saved when installation is not done by jenkins
• logs must be saved even when Jenkins Pipeline is broken
21
utPLSQL
• utPLSQL is used for Unit Testing
http://utplsql.org/
• One job by every bigger component
• utPLSQL will generate an XML Output
• Use Post-build Action to generate one XML
File based on the output
• Use Publish Junit test result report for
generating the Test Result
22
Build a Release File
• Customer needs an installationfile => one ZIP-Archive
• ZIP-Archive will be add to VCM (Artifact)
• Installation without Jenkins is needed
• Parameters for Databases must be added
• Parameters for Development/Testing environments are removed
• Further checks only for developer purposes are removed
• Release Notes will be generated
23
GoDevOps Conference in 2020 will come
mt-ag.com/apex-support
News from the MT Lab: APEX Testing Framework
• APEX metadata-driven User Acceptance Tests
• Execute on many different test engines
(Selenium, browserstack.com, Puppeteer, etc.)
• Demo Video: https://bit.ly/apextesting
• Contacts:
• Kai Donato
• Fabian Neureiter
1. Get APEX 2. Create testcases3. Schedule/Run testcases
26
?
Vielen Dank für die Aufmerksamkeit!
Fragen oder
Diskussionsbeiträge

More Related Content

PDF
Jenkins Pipeline meets Oracle
PPTX
Jenkins presentation
PDF
Graphql usage
PPTX
Pipeline as code using Jenkins -Ministry of Testing
ODP
Pipeline based deployments on Jenkins
PDF
JavaOne 2016 - Pipeline as code
PPTX
Jenkins days workshop pipelines - Eric Long
PDF
Sprint 17
Jenkins Pipeline meets Oracle
Jenkins presentation
Graphql usage
Pipeline as code using Jenkins -Ministry of Testing
Pipeline based deployments on Jenkins
JavaOne 2016 - Pipeline as code
Jenkins days workshop pipelines - Eric Long
Sprint 17

What's hot (20)

PPTX
Jenkins Pipeline 101 and TCI - presentation and workshop
PDF
7 Habits of Highly Effective Jenkins Users
PPTX
Jenkins pipeline as code
PDF
Ci For The Web 2.0 Guy Or Gal
PPTX
Pipeline as code - new feature in Jenkins 2
PDF
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
PDF
JCConf 2015 workshop 動手玩 Java 專案建置工具
ODP
Jenkins Pipelining and Gatling Integration
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
PPTX
Continuous testing
PDF
Brujug Jenkins pipeline scalability
PPT
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
PPTX
7 Habits of Highly Effective Jenkins Users
PDF
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
PDF
JSDC 2015 - TDD 的開發哲學,以 Node.js 為例
PDF
Automated acceptance test
PPTX
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
PPTX
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
PPTX
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
PDF
Jenkins to Gitlab - Intelligent Build-Pipelines
Jenkins Pipeline 101 and TCI - presentation and workshop
7 Habits of Highly Effective Jenkins Users
Jenkins pipeline as code
Ci For The Web 2.0 Guy Or Gal
Pipeline as code - new feature in Jenkins 2
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
JCConf 2015 workshop 動手玩 Java 專案建置工具
Jenkins Pipelining and Gatling Integration
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Continuous testing
Brujug Jenkins pipeline scalability
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
7 Habits of Highly Effective Jenkins Users
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
JSDC 2015 - TDD 的開發哲學,以 Node.js 為例
Automated acceptance test
Володимир Дубенко "Node.js for desktop development (based on Electron library)"
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Jenkins to Gitlab - Intelligent Build-Pipelines
Ad

Similar to Jenkins Pipelines Advanced (20)

PPTX
Maven TestNg frame work (1) (1)
PDF
(Declarative) Jenkins Pipelines
PPTX
Maven TestNg frame work (1) (1)
PDF
JUC Europe 2015: Hey! What Did We Just Release?
PPTX
PPTX
Jenkins advance topic
PPTX
Moving from Jenkins 1 to 2 declarative pipeline adventures
PDF
Continuous delivery with Jenkins Enterprise and Deployit
PDF
Integrating Maven with Eclipse
PDF
Jenkins User Conference - Preparing for Enterprise Continuous Delivery: 5 Cri...
PPTX
CI from scratch with Jenkins (EN)
PDF
anand kr_2years_selenium
PPTX
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
PDF
Implementing CI CD UiPath Using Jenkins Plugin
PDF
vodQA Pune (2019) - Jenkins pipeline As code
PPTX
Jenkins2 - Coding Continuous Delivery Pipelines
PDF
Jenkins Declarative Pipelines 101
PPTX
Continuous Deployment Pipeline with maven
PDF
Jenkins Pipelines
Maven TestNg frame work (1) (1)
(Declarative) Jenkins Pipelines
Maven TestNg frame work (1) (1)
JUC Europe 2015: Hey! What Did We Just Release?
Jenkins advance topic
Moving from Jenkins 1 to 2 declarative pipeline adventures
Continuous delivery with Jenkins Enterprise and Deployit
Integrating Maven with Eclipse
Jenkins User Conference - Preparing for Enterprise Continuous Delivery: 5 Cri...
CI from scratch with Jenkins (EN)
anand kr_2years_selenium
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Implementing CI CD UiPath Using Jenkins Plugin
vodQA Pune (2019) - Jenkins pipeline As code
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins Declarative Pipelines 101
Continuous Deployment Pipeline with maven
Jenkins Pipelines
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
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
PDF
How to use source control with apex?
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
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
How to use source control with apex?
Enterprise APEX

Recently uploaded (20)

PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
STKI Israel Market Study 2025 version august
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Architecture types and enterprise applications.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
August Patch Tuesday
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Modernising the Digital Integration Hub
PDF
Hybrid model detection and classification of lung cancer
Web Crawler for Trend Tracking Gen Z Insights.pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
1 - Historical Antecedents, Social Consideration.pdf
Assigned Numbers - 2025 - Bluetooth® Document
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Zenith AI: Advanced Artificial Intelligence
Benefits of Physical activity for teenagers.pptx
Getting started with AI Agents and Multi-Agent Systems
STKI Israel Market Study 2025 version august
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
WOOl fibre morphology and structure.pdf for textiles
DP Operators-handbook-extract for the Mautical Institute
Architecture types and enterprise applications.pdf
Tartificialntelligence_presentation.pptx
August Patch Tuesday
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Group 1 Presentation -Planning and Decision Making .pptx
Modernising the Digital Integration Hub
Hybrid model detection and classification of lung cancer

Jenkins Pipelines Advanced

  • 1. 1 Oliver Lemm - DOAG 2019 Jenkins Pipelines Advanced
  • 2. 2 Unsere Hard Facts Zertifizierter Partner von Oracle Microsoft 280 Beschäftigte Inhabergeführt Ausbildungsbetrieb Partner im dualen Studium Branchen- übergreifend Herstellerneutral Hauptsitz Ratingen Niederlassungen Frankfurt am Main Köln Dortmund München Gründung 1994 33 Mio. Euro Umsatz >100 Kunden Ihr Partner für den digitalen Wandel Individuelle IT-Lösungen aus einer Hand
  • 3. 4 Oliver Lemm • Business Unit Leader APEX @ MT AG • Architect, Project Leader, Developer
  • 4. 5 Agenda • Jenkins Pipelines • Jenkinsfile • Best Practices • Future
  • 5. 6 what is a Pipeline? doing multiple steps in one “job” Domain Specific Language (DSL) pipeline output
  • 6. 7 pipeline vs standard Job durable - robust advantages of pipeline are pausable - pausierbar versatile - vielseitig extensible - erweiterbar versionable - versionierbar
  • 7. 8 creating a pipeline (1) new Item „pipeline“
  • 9. 10 Jenkinsfile simple example 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%''' } } } }
  • 10. 11 Jenkinsfile output pipeline { agent {…} stages { stage('Export APEX App') {…} stage('Commit to trunk') {…} stage('Import APEX App') {…} } }
  • 11. 12 Jenkinsfile vs inline script both • groovy Syntax Jenkinsfile • Versionable • reuseable Script • Snippet Generator • easier to use
  • 12. 13 Pipelines & Jobs Jobs are reuseable in pipelines 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') { … } } }
  • 13. 14 Workspace / “Arbeitsbereich” • one repository by project • less space • less traffic • faster • Workspace not below “jobs” … agent { label { label "" customWorkspace "C:/jenkins_projects/cicd" } } …
  • 14. 15 Passwords 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%''‚ }}} stage('Commit to trunk') { steps { withCredentials([usernamePassword(credentialsId: '8a1d2bde-19e2-4a63-be00-f1145a8bdfe3', passwordVariable: 'svn_password', usernameVariable: 'svn_username')]) { bat '''cd trunkapex svn --username=%svn_username% --password=%svn_password% add f%app_id%.sql –force svn --username=%svn_username% --password=%svn_password% commit -m "automatic commit from Jenkins" f%app_id%.sql''‚ }}} with Credentials Binding Plugin
  • 15. 16 Errorhandling basic findText regexp: '<regular expression>', fileSet: '<file set>‘ check the console log: findText regexp: '<regular expression>', fileSet: '<file set>', alsoCheckConsoleOutput: true only check console: findText regexp: '<regular expression>', alsoCheckConsoleOutput: true mark success, warning or failure use succeedIfFound, unstableIfFound, or notBuiltIfFound: findText regexp: '<regular expression>, alsoCheckConsoleOutput: true, unstableIfFound: true with Text Finder plugin (since Version 1.11)
  • 16. 17 Errorhandling stage("Install all QS Packages") { steps { bat 'REM -----Install all QS Packages STARTED-----' bat '''cd trunk batchinstall_qs_objects batchaccount_data_%environment%.txt''‚ bat 'REM -----Install all QS Packages FINISHED-----' script { String[] errors = ["ORA-", "SP2-"] String[] warnings = ["WARNING"] checkConsoleOutputAfterBuildStep("-----Install all QS Packages STARTED-----", "-----Install all QS Packages FINISHED-----", errors, "Install all QS Packages Failed!", "FAILURE") checkConsoleOutputAfterBuildStep("-----Install all QS Packages STARTED-----", "-----Install all QS Packages FINISHED-----", warnings, "Install all QS Packages has warnings!", "UNSTABLE") }}} custom plugin
  • 17. 18 Support multiple Environments One Pipelinejob for multiple instances • only one pipeline to maintain One Pipelinejob for every instance • less parameters • automation possible • see when last time the environment was updated • see which environment is successfully patched one Jenkinsfile is used for …
  • 18. 19 Parameters • Impdp_source_environment => which base datapump file to use? • Version => which version to install? • Impdp_version => what is the version of the dataump file? • run_install_script_pre_version => any script which has to run after import the dump`?
  • 19. 20 Logs • logs are generated every installation • logs are save inside Source Control Management • logs are related to the release • logs are also saved when installation is not done by jenkins • logs must be saved even when Jenkins Pipeline is broken
  • 20. 21 utPLSQL • utPLSQL is used for Unit Testing http://utplsql.org/ • One job by every bigger component • utPLSQL will generate an XML Output • Use Post-build Action to generate one XML File based on the output • Use Publish Junit test result report for generating the Test Result
  • 21. 22 Build a Release File • Customer needs an installationfile => one ZIP-Archive • ZIP-Archive will be add to VCM (Artifact) • Installation without Jenkins is needed • Parameters for Databases must be added • Parameters for Development/Testing environments are removed • Further checks only for developer purposes are removed • Release Notes will be generated
  • 22. 23 GoDevOps Conference in 2020 will come
  • 24. News from the MT Lab: APEX Testing Framework • APEX metadata-driven User Acceptance Tests • Execute on many different test engines (Selenium, browserstack.com, Puppeteer, etc.) • Demo Video: https://bit.ly/apextesting • Contacts: • Kai Donato • Fabian Neureiter 1. Get APEX 2. Create testcases3. Schedule/Run testcases
  • 25. 26 ? Vielen Dank für die Aufmerksamkeit! Fragen oder Diskussionsbeiträge