SlideShare une entreprise Scribd logo
1  sur  67
Continuous Integration
with Jenkins and Java EE
Francesco Marchitelli
marchitelli.francesco@gmail.com @marcyborg
Agenda
What is CI
● In software engineering, continuous integration
(CI) implements continuous processes of applying
quality control - small pieces of effort, applied
frequently.
● Continuous integration aims to improve the quality
of software, and to reduce the time taken to deliver
it, by replacing the traditional practice of applying
quality control after completing all development.
History
• Continuous Integration emerged in the Extreme
Programming (XP) community, and XP advocates
Martin Fowler and Kent Beck first wrote about
Continuous Integration circa 1999.
Martin Fowler
● Continuous Integration is a software development
practice where members of a team integrate their
work frequently, usually each person integrates at
least daily - leading to multiple integrations per
day.
● Each integration is verified by an automated build
(including test) to detect integration errors as
quickly as possible.
Features of Continuous
Integration
Hell of Integration
How to avoid it?
SCM
Automate Build
Auto-Testing Build
Commit on Baseline
Every Commit Could Be a Build
Fast Build
Test Env Same As Production
Easy to Retrieve Last Version
Live Update
Automate Deployment
CI Benefit
●Project Management
 Detect system development problems earlier
 Reduce risks of cost, schedule, and budget
●Code Quality
 Measurable and visible code quality
 Continuous automatic regression unit test
CI Overview
What is CD?
What is CD?
CI vs CD
Principles of Continuous
Delivery
Principle #1
Every Build is a Potential Release
Principle #2
Eliminate Manual Bottlenecks
Automate Whatever Possible
Principle #3
Have Automated Tests You Can Trust
Principle #4
Build Pipelines
The Conveyer Belts of Continuous Delivery
Jenkins
1. An open source CI server
2. More then 85000 installations
3. Plug-in extensibility (Over 900 plugins)
4. MIT license
Jenkins Features
● Trigger a build
● Get source code from repository
● Automatically build and test
● Generate report & notify
● Deploy
● Distributed Build
Jenkins Requirement
● Web Server (Tomcat, WebLogic, …)
● Build tool (Maven, Ant)
● SCM (Git, Svn, Cvs, …)
Jenkins Plugins
● Build triggers
● Source code management
● Build tools
● Build notifiers
● Build reports
● Artifact uploaders
● UI plugins
● Authentication and user management
Build Trigger
● Manually click build button
● Build periodically
● Build whenever a SNAPSHOT dependency is built
● Build after other projects are built
● Poll SCM
● IRC, Jabber, …
Build Report
● Static Code Analysis
• Checkstyle, PMD, Findbugs, Compiler Warning
● Test Report & Code Coverage
• JUnit, TestNG, Cobertura, Clover
● Open Tasks
Security Management
●Security Realm
• LDAP
• Jenkins's own user
database
• Delegate to servlet
container
●Authorization
• Anyone can do anything
• Logged-in users can do
anything
• Matrix-based security
• Project-based Matrix
Authorization Strategy
• Legacy mode
Configuration as Code: Job DSL
Plugin
●Create new pipelines quickly
●Refactor jobs
●Trace changes
●Work with your favorite tool set
Jenkins job pipeline
Job DSL Plugin
●Install Job DSl Plugin
●Create free-style project
●Add “Source Code Management”
●Add “Process Job DSLs” build step
●Configure scripts
●Run job
Everything is Groovy
def branches = ['master', 'feature-a']
branches.each { branch ->
job("jenkins-${branch}") {
scm {
github('marcyborg/helloworld-rs', branch)
}
…
}
}
node {
def server = Artifactory.newServer url: SERVER_URL, credentialsId: CREDENTIALS
def rtMaven = Artifactory.newMavenBuild()
stage 'Build'
git url: 'https://github.com/marcyborg/helloworld-rs.git'
stage 'Artifactory configuration'
rtMaven.tool = MAVEN_TOOL // Tool name from Jenkins configuration
rtMaven.deployer releaseRepo:'libs-release-local', snapshotRepo:'libs-snapshot-local',
server: server
rtMaven.resolver releaseRepo:'libs-release', snapshotRepo:'libs-snapshot', server: server
def buildInfo = Artifactory.newBuildInfo()
stage 'Exec Maven'
rtMaven.run pom: 'maven-example/pom.xml', goals: 'clean install', buildInfo: buildInfo
stage 'Publish build info'
server.publishBuildInfo buildInfo
}
Maven lifecycle
Minimize build jobs for the main build
Split unit and integration tests
JBoss Wildfly
● Previously named JBoss Application Server
● Named change to better differentiate Community from Supported product
● Support Java EE 7
● Fast, Lightweight, Manageable
● Developer Friendly
● Open Source
Wildfly-Maven-plugin
Jenkins to Wildfly using Maven
Installing Git in Jenkins
Creating a Git project in Jenkins
Installing Github in Jenkins
Creating a Github project in Jenkins
Installing Maven in Jenkins
Creating a Maven Github project in Jenkins
Thanks!
Please Leave a Feedback!
https://goo.gl/uV7Aw3

Contenu connexe

Tendances

Introduction to Google Cloud
Introduction to Google CloudIntroduction to Google Cloud
Introduction to Google CloudDSC IEM
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingSimon Su
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform UpdatesRomin Irani
 
Google Cloud Platform - Service Glossary
Google Cloud Platform - Service GlossaryGoogle Cloud Platform - Service Glossary
Google Cloud Platform - Service GlossaryJoseph's Cloud Library
 
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...Bitnami
 
Powering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformPowering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformRomin Irani
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesChris Schalk
 
Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017Google Cloud Korea
 
Spark on Dataproc - Israel Spark Meetup at taboola
Spark on Dataproc - Israel Spark Meetup at taboolaSpark on Dataproc - Israel Spark Meetup at taboola
Spark on Dataproc - Israel Spark Meetup at taboolatsliwowicz
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter GuideSimon Su
 
30 Days Of Google Cloud Info Session-GDSC AU
30 Days Of Google Cloud Info Session-GDSC AU30 Days Of Google Cloud Info Session-GDSC AU
30 Days Of Google Cloud Info Session-GDSC AUAKSHATPATEL48
 
Dockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud ServicesDockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud ServicesPatrick Chanezon
 
Container on azure
Container on azureContainer on azure
Container on azureVishwas N
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudKenny Bastani
 
Google Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseGoogle Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseDaniel Zivkovic
 
PaaS application in Heroku
PaaS application in HerokuPaaS application in Heroku
PaaS application in HerokuDileepa Jayakody
 

Tendances (20)

Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Introduction to Google Cloud
Introduction to Google CloudIntroduction to Google Cloud
Introduction to Google Cloud
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform Updates
 
Google Cloud Platform - Service Glossary
Google Cloud Platform - Service GlossaryGoogle Cloud Platform - Service Glossary
Google Cloud Platform - Service Glossary
 
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
 
TIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google CloudTIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google Cloud
 
Powering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud PlatformPowering your Apps via Google Cloud Platform
Powering your Apps via Google Cloud Platform
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
 
Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017Google Cloud Connect Korea - Sep 2017
Google Cloud Connect Korea - Sep 2017
 
Spark on Dataproc - Israel Spark Meetup at taboola
Spark on Dataproc - Israel Spark Meetup at taboolaSpark on Dataproc - Israel Spark Meetup at taboola
Spark on Dataproc - Israel Spark Meetup at taboola
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter Guide
 
30 Days Of Google Cloud Info Session-GDSC AU
30 Days Of Google Cloud Info Session-GDSC AU30 Days Of Google Cloud Info Session-GDSC AU
30 Days Of Google Cloud Info Session-GDSC AU
 
Dockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud ServicesDockercon 2019 Developing Apps with Containers, Functions and Cloud Services
Dockercon 2019 Developing Apps with Containers, Functions and Cloud Services
 
Intro to Google Cloud Platform Data Engineering.
Intro to Google Cloud Platform Data Engineering.Intro to Google Cloud Platform Data Engineering.
Intro to Google Cloud Platform Data Engineering.
 
Container on azure
Container on azureContainer on azure
Container on azure
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring Cloud
 
Google Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash CourseGoogle Cloud Functions & Firebase Crash Course
Google Cloud Functions & Firebase Crash Course
 
PaaS application in Heroku
PaaS application in HerokuPaaS application in Heroku
PaaS application in Heroku
 
Intro to Google Cloud Platform Data Engineering.- Endpoints
Intro to Google Cloud Platform Data Engineering.- EndpointsIntro to Google Cloud Platform Data Engineering.- Endpoints
Intro to Google Cloud Platform Data Engineering.- Endpoints
 

Similaire à CI with Jenkins, Java EE, Wildfly

Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationHùng Nguyễn Huy
 
Continuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzDenis Ristic
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developerAbe Diaz
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachGiovanni Toraldo
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkinsVinay H G
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkinsecubemarketing
 
Seminar continuous delivery 19092013
Seminar continuous delivery 19092013Seminar continuous delivery 19092013
Seminar continuous delivery 19092013Joris De Winne
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitisSteve Povilaitis
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Binary Studio
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationhugo lu
 
Hudson
HudsonHudson
Hudson8x8
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Continuous Integrations & Deployments
Continuous Integrations & DeploymentsContinuous Integrations & Deployments
Continuous Integrations & DeploymentsShinu Suresh
 

Similaire à CI with Jenkins, Java EE, Wildfly (20)

Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Continuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVz
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developer
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery Approach
 
Continuous integration (eng)
Continuous integration (eng)Continuous integration (eng)
Continuous integration (eng)
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkins
 
Seminar continuous delivery 19092013
Seminar continuous delivery 19092013Seminar continuous delivery 19092013
Seminar continuous delivery 19092013
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Transition from CI to CD
Transition from CI to CDTransition from CI to CD
Transition from CI to CD
 
Hudson
HudsonHudson
Hudson
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Meet Jenkins
Meet JenkinsMeet Jenkins
Meet Jenkins
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Continuous Integrations & Deployments
Continuous Integrations & DeploymentsContinuous Integrations & Deployments
Continuous Integrations & Deployments
 

Dernier

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

CI with Jenkins, Java EE, Wildfly

Notes de l'éditeur

  1. DIRE!!! Scarico il codice sorgente ● Faccio le mie modifiche ● Eseguo i test ● Decido di fare commit ● Peccato che qualcuno ha fatto commit sulle stesse classi ● Cerco di gestire tutti i conflitti ● Non posso! Sono troppi! ● Ri-scarico il codice e ricomincio da capo :-(
  2. POSSO ANCHE NON DIRE!!! Mantieni un repository del codice sorgente ● Automatizza il build ● Rendi il build auto-testante ● Tutti eseguono una commit alla baseline tutti i giorni ● Ogni commit fa partire una build ● Fai in modo che la build sia veloce ● Esegui i test in un clone dell'ambiente di produzione ● Prendere le ultime versioni dei pacchetti deve essere facile ● Ognuno può vedere quello che sta succedendo ● Automatizza il dispiegamento
  3. Basta usare un software per il controllo della versione ● Scegliere tra lock or merge o sistema distribuito ● Stanno prendendo piede i sistemi di controllo di versione distribuito come Git e Mercurial ● Sono ancora molto usati quelli a lock ottimistico come Subversion e CVS
  4. Per build intendiamo il processo che porta dal codice sorgente all'artefatto che può girare sul server o direttamente sul computer client ● Per buildare basterebbe solo Eclipse, anche se la configurazione in questo caso sarebbe molto complicata da gestire ● Opzione più diffusa è Maven, che permette anche di gestire le dipendenze da librerie open source ● Progetti legacy: Ant ● Altre opzioni possibili sono Gradle, Ivy e Buildr
  5. Abbiamo sia i test unitari che i test di integrazione ● Solitamente i test unitari sono parecchio più veloci dei test di integrazione ● Se si è deciso di usare Maven come sistema di build, basterà mettere i test unitari nella sottocartella /src/test/java ● Per i test di integrazione ci sono varie librerie, tra cui Selenium, SoapUI, Jmeter, Arquillian
  6. È importante per limitare i conflitti e quindi l'inferno dell'integrazione ● Difficile convincere gli sviluppatori a fare commit tutti i giorni ● Ancora più difficile convincerli a testare il codice prima di committarlo
  7. Far partire unicamente i test unitari, postporre i test di integrazione a quando è possibile, comunque almeno una volta al giorno ● Ogni singolo commit potrebbe creare errori o fare fallire i test ● È importante che un eventuale commit che porta nuovi bug venga individuato immediatamente e vi sia posto rimedio ● Questo principio si basa sul principio “fail fast“
  8. Se ogni commit fa partire una build, la build deve essere la più veloce possibile ● Suddividere build in due fasi ● Prima fase: compilazione e test unitari ● Seconda fase: test di integrazione ● La seconda fase gira quando possibile
  9. Anche la più piccola delle differenze tra l'ambiente di test e quello di produzione può rendere estremamente difficile riprodurre un bug ● Stesso sistema operativo ● Stessa base dati ● Stessa JVM ● Stesso application / web server ● Stessi browser
  10. Per le persone è più facile vedere ed eseguire le versioni intermedie del software e dire che cosa è che non va ● Fai in modo che ci sia un posto in cui tutte le persone possano prendere l'eseguibile e testarlo ● Sopratutto le persone che devono far girare delle demo dei prodotti per far vedere a potenziali clienti il funzionamento del software hanno bisogno di sapere dove trovare i pacchetti
  11. Lo stato del progetto deve essere visibile e trasparente a tutte le parti coinvolte ● Questo permette di stabilire scadenze realistiche e allocare tempo per la risoluzione dei problemi attuali ● Inoltre, problemi di usabilità possono essere individuati più velocemente se è possibile vedere e testare facilmente l'applicativo ● È possibile stabilire un rapporto di fiducia con tutte le parti coinvolte nel processo di sviluppo
  12. Per dispiegamento si intende il trasferimento degli artefatti sull'ambiente di destinazione e l'esecuzione di script di allineamento ● Per fare continous integration bisogna avere diversi ambienti che devono essere allineati più volte al giorno ● Per fare questo è buona norma avere dei meccanismi che permettano il rilascio dei risultati delle build sui vari ambienti, compreso quello di produzione ● Dopo il build è possibile trasferire il risultato del build in una cartella di un ambiente e far girare degli script di allineamento
  13. CD is an attitude
  14. L’obiettivo finale della metodologia di sviluppo software è quella di ridurre il tempo che intercorre tra l’attuale rilascio e il feedback dei clienti, da anni a ore…anche perché cambiano i requisiti funzionali continuamente. In CD, ciascun commit può essere rilasciato al cliente in qualsiasi momento. Tutto questo richiede un’organizzazione massiva.
  15. Continuous Integration - is an automation to build and test application whenever new commits are pushed into the branch. Continuous Delivery - is Continuous Integration + Deploy application to production by "clicking on a button" (Release to customers is often, but on demand). Continuous Deployment - is Continuous Delivery but without human intervention (Release to customers is on-going).
  16. each commit is a potential release PACKAGE AND DEPLOY: we reuse the same binaries ACCEPTANCE TESTS: automated tests give us confidence in our build DEV, QA, PROD: automated, repeatable deployments WILDFLY CLUSTER… LOAD BALANCING
  17. ● Estensibile tramite plugin
  18. Web application che gira in un servlet container ● Permette di lanciare delle build ● Permette di vedere i risultati dei test
  19. ● Si integra con gli strumenti di controllo delle versioni e con gli strumenti di automazione dei build ● È in grado di scaricare autonomamente Maven e Ant
  20. ● Non ha bisogno di basi dati per funzionare: salva le configurazioni in file XML
  21. Il plugin per il DSL permette la creazione programmatica di progetti. Usando uno script per pushare un job permette di automatizzare e standardizzare l’installazione di Jenkins, al contrario di quanto possibile finora. Progetto free-style è l’aspetto fondamentale di Jenkins, perché mi permette di buildare il mio progetto, combinarlo con qualsiasi sistema di versionamento del codice, e usarlo eventualmente con altre caratteristiche che non siano build.
  22. Jenkins utilizza Groovy come linguaggio di scripting per scrivere job, che presenta caratteristiche simili a quelle di Python, Ruby, Perl, e Smalltalk. Groovy usa una sintassi simile a quella di Java, basata su parentesi graffe, viene compilato dinamicamente in bytecode per la Java Virtual Machine, ed interagisce in modo trasparente con altro codice Java e con le librerie esistenti. Il compilatore di Groovy può essere usato per generare bytecode Java standard che può quindi essere usato da qualsiasi progetto Java. Posso usare anche shell scripting come curl o wget. Risolvere le dipendenze e il download prima di mandare in running il job.
  23. Un tipico job orientato alla CI, prende in input una stringa con il nome di un tag o di un branch e recupera i sorgenti corrispondenti copiandoli nella cartella del job dentro il workspace di Jenkins. Esegue poi l’invocazione di maven in quell’ambiente, con le opzioni e i goal predisposti. Le fasi di un job di tipo Maven sono: ● Lettura dei parametri di input, ● Gestione del codice sorgente, ● Pre-build Steps, ● Maven build, ● Post-build Steps, ● Azioni dopo la build
  24. Per la gestione centralizzata dell'intera fase di costruzione, reporting e documentazione dei vari moduli, Maven, uno strumento di gestione di progetti software basato sul concetto di modello a oggetti di progetto (POM). COMPILE E UNIT TEST: mvn test INTEGRATION TEST: mvn verify DEPLOY TO REPOSITORY: mvn deploy MINIMIZE BUILD JOBS FOR THE MAIN BUILD: mvn install
  25. escludere integration tests dalla fase di test run solo integration tests in the integration-test phase
  26. developer always work on a snapshot version the number of snapshot is pretty arbitrary
  27. We add this Wildfly plugin to our project’s pom.xml under the build >> plugins section and the plugin is pointed at the Wildfly master instance. To make an application distributable in a cluster, you have to edit its web.xml to have the <distributable> tag for session replication. This allows us to have the master act as domain controller and host and the slave under control of the master. The domain controller then deploys the web project to both master and slave.
  28. definire quale sorgente di SCM Jenkins dovrà prendere in input, Git o SVN come detto in precedenza, e definire il goal con il quale Maven interfacciandosi con il wildfly-maven-plugin permetterà di eseguire il deploy automatico del war su Wildfly. Per fare questo, bisogna ricordarsi di configurare nel pom.xml l’utente Jenkins, in modo che sia ammesso a comunicare con wildfly. Per effettuare l’undeploy del war dal server, sarà sufficiente cambiare il Maven Goal, nello specifico mvn wildfly:undeploy. Essendo Groovy interpretato dalla JVM, posso andare ad inserire ulteriori parametri nel Maven Goal, ad esempio l’hostname, qualora ci fossero problemi nella comunicazione tra Jenkins e Wildfly mediante il wildfly-maven-plugin.
  29. Git is installed in Jenkins as a default plugin. If not installed, it can be installed using option - manage Jenkins -> manage plugin -> Click ‘available’ tab -> search & select Git plugin -> click ‘download now & install after restart’- submit button. This will install Git in your Jenkins.
  30. A project is created in Jenkins with Git as SCM using option – new item -> update project name as new item name -> select freestyle or maven project -> press ok -> Select Git in ‘Source Control Management’ section -> update your Git repository URL in repository URL field -> press apply & save button.
  31. github is installed in Jenkins as default plugin If not installed, it can be installed using option - manage Jenkins -> manage plugin Click ‘available’ tab -> search & select Github plugin -> click ‘download now & install after restart’- submit button. This will configure Github in your Jenkins.
  32. A project is created in Jenkins with Github as SCM using option – new item -> update project name as new item name -> select freestyle or maven project -> press ok -> update Github project URL under general - Github project – project URL -> Select Git in ‘Source Control Management’ section -> update your Github repository URL in repository URL field -> press apply & save button.
  33. Maven is not available as default plugin in Jenkins. Maven is installed in Jenkins using option - manage Jenkins -> manage plugin -> Click ‘available’ tab -> search & select Maven integration plugin -> click ‘download now & install after restart’ submit button. Then, manage Jenkins -> global tool configuration -> under JDK section update JDK version in JDK name -> update jdk location of your server in JDK_HOME -> Under Maven update Maven version in Maven name -> update maven location of your server in Maven_HOME. This will configure Maven in your Jenkins.
  34. A maven & Github project is created in Jenkins using option – new item -> update project name as new item name -> select maven project -> press ok -> update Github project URL in project URL field under general & Github project -> Select Git in ‘Source Control Management’ section -> update your Github repository URL in ‘repository URL’ field -> check ‘resolve dependencies during POM parsing’ under build section -> press apply & save button -> Create POM xml with required instruction and save the POM xml file in the Github repository.