SlideShare uma empresa Scribd logo
1 de 21
Continuous Integration Lior Tal Automation Developer
Continuous Integration Automated Builds Tools DVCS (Git) Agenda
Continuous Integration How good is our code? I think it’s pretty good… Does the code work? I tested it, it seems to do what it should… Does the code have bugs? I hope not…
Continuous Integration Need to simplify complex integration of code Need a good criteria for measuring our code quality Need to have “Self-testing” code
“a software development practice where members of a team integrate their work frequently, leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.  Continuous Integration
Developer checks in new code An automated build is kicked off with all latest code changes Unit tests and [optional] other tools are executed Developer receives a notification if the build succeeded or failed [optional] Failing commits are rejected from the source code repository Continuous Integration
The code should build directly from source control The code should be built in a single automated command This makes it easier in multiple scenarios: New developer joins the team Code is built automatically on a build server Automated Builds
Build script can be created using standard technologies MSBuild Batch file Multiple build configurations should be defined “Small” build that runs on every check in Should be very fast “Big” build that runs nightly Can have a bigger scope (build MSI, run integration tests) Automated Builds
Many tools can be integrated into the build process Some examples (.NET): Code Coverage – Coverage (in %) by unit tests. Code Duplications – find duplicated code Code Analysis StyleCop – Find styling errors in code FXCop – Static code analysis Tools
Tools – Code Coverage
Tools – Code Coverage
Define a set of styling rules: These can be run from the IDE or from a build script Show warnings/errors when compiling: Tools - StyleCop
Many tools can be integrated into the build process Some examples (.NET): Code Coverage – Coverage (in %) by unit tests. Code Duplications – find duplicated code Code Analysis StyleCop – Find styling errors in code FXCop – Static code analysis Tools – FXCop
Older VCS tools are centralized (central server model) Subversion, ClearCase Centralized tools suffer from a few issues: Network latency (server needed for most operations). Submitting “half-ready” code can break other people’s work. DVCS (Git)
Many modern VCS tools are distributed This means a central server is optional Each developer gets a copy of the entire repository A central server can still be setup Used as a sync point for team members DVCS (Git)
Git offers a command line tool (comes from Linux) On Windows: Shell Extension Visual Studio integration using plugins DVCS (Git)
Git Workflow Centralized Workflow
Git Workflow Integration-Manager
CI Implementation #1 CI Server Source Control (Git) TeamCity Build Agent CI Build Nightly Build
CI Implementation #1 What we gained: Basic framework for more complicated tasks Source control contains a “clean” copy of the code Fast notification on build issues Starting to incorporate basic unit tests Installer (.MSI) creation is automatic Using a modern source control system (Git)
CI Implementation #2 CI Server Git CI Build Build Agent Build Agent Build Agent … Nightly Build VM Server Win7 x64 Win7 Win XP …

Mais conteúdo relacionado

Mais procurados

Test automation
Test automationTest automation
Test automationXavier Yin
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkAgile Testing Alliance
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and AutomationMahesh Salaria
 
Types of test tools
Types of test toolsTypes of test tools
Types of test toolsVaibhav Dash
 
Build your first Laravel application
Build your first Laravel applicationBuild your first Laravel application
Build your first Laravel applicationGiannis Gasteratos
 
Automation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterAutomation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterVijayChowthri Nagaprakasham
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTYogindernath Gupta
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsSmartBear
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure TestingRanjib Dey
 
Android tdd
Android tddAndroid tdd
Android tddNhan Cao
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test CompleteVartika Saxena
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...eleksdev
 
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...Xebia Nederland BV
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”EPAM Systems
 
Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridMoataz Nabil
 
Track code quality with SonarQube - short version
Track code quality with SonarQube - short versionTrack code quality with SonarQube - short version
Track code quality with SonarQube - short versionDmytro Patserkovskyi
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha
 
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsTechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsDicodingEvent
 

Mais procurados (20)

Fortify - Source Code Analyzer
Fortify - Source Code AnalyzerFortify - Source Code Analyzer
Fortify - Source Code Analyzer
 
Test automation
Test automationTest automation
Test automation
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Types of test tools
Types of test toolsTypes of test tools
Types of test tools
 
Build your first Laravel application
Build your first Laravel applicationBuild your first Laravel application
Build your first Laravel application
 
Automation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterAutomation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional Tester
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure Testing
 
Android tdd
Android tddAndroid tdd
Android tdd
 
Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
 
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
 
Devops | CICD Pipeline
Devops | CICD PipelineDevops | CICD Pipeline
Devops | CICD Pipeline
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”
 
Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium Grid
 
Track code quality with SonarQube - short version
Track code quality with SonarQube - short versionTrack code quality with SonarQube - short version
Track code quality with SonarQube - short version
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsTechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
 

Destaque

Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous IntegrationChristopher Read
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentChristopher Read
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Destaque (7)

Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous Integration
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Semelhante a Introduction to Continuous integration

Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approachAleksandr Tsertkov
 
Hudson
HudsonHudson
Hudson8x8
 
Software engineering
Software engineeringSoftware engineering
Software engineeringbartlowe
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsSunil Dalal
 
devops ppt for hjs jsdjhjd hsdbusinees.pptx
devops ppt for hjs jsdjhjd hsdbusinees.pptxdevops ppt for hjs jsdjhjd hsdbusinees.pptx
devops ppt for hjs jsdjhjd hsdbusinees.pptxDeepakgupta273447
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0Jasmine Conseil
 
Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile Poonam Panday
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Using Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health NewUsing Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health Newbartlowe
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0Jasmine Conseil
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applicationsSunil Dalal
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
Intro to CI/CD using Docker
Intro to CI/CD using DockerIntro to CI/CD using Docker
Intro to CI/CD using DockerMichael Irwin
 
Delivering Quality Software with Continuous Integration
Delivering Quality Software with Continuous IntegrationDelivering Quality Software with Continuous Integration
Delivering Quality Software with Continuous IntegrationAspire Systems
 
Smart development environments
Smart development environmentsSmart development environments
Smart development environmentsWojciech Sznapka
 
Building a CI/CD Pipeline for PHP apps
Building a CI/CD Pipeline for PHP appsBuilding a CI/CD Pipeline for PHP apps
Building a CI/CD Pipeline for PHP appsJuan Manuel Torres
 

Semelhante a Introduction to Continuous integration (20)

Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approach
 
Hudson
HudsonHudson
Hudson
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
devops ppt for hjs jsdjhjd hsdbusinees.pptx
devops ppt for hjs jsdjhjd hsdbusinees.pptxdevops ppt for hjs jsdjhjd hsdbusinees.pptx
devops ppt for hjs jsdjhjd hsdbusinees.pptx
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0
 
Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Using Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health NewUsing Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health New
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Build Time Hacking
Build Time HackingBuild Time Hacking
Build Time Hacking
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Intro to CI/CD using Docker
Intro to CI/CD using DockerIntro to CI/CD using Docker
Intro to CI/CD using Docker
 
Delivering Quality Software with Continuous Integration
Delivering Quality Software with Continuous IntegrationDelivering Quality Software with Continuous Integration
Delivering Quality Software with Continuous Integration
 
Smart development environments
Smart development environmentsSmart development environments
Smart development environments
 
Building a CI/CD Pipeline for PHP apps
Building a CI/CD Pipeline for PHP appsBuilding a CI/CD Pipeline for PHP apps
Building a CI/CD Pipeline for PHP apps
 
Continuous integration
Continuous integration Continuous integration
Continuous integration
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Introduction to Continuous integration

  • 1. Continuous Integration Lior Tal Automation Developer
  • 2. Continuous Integration Automated Builds Tools DVCS (Git) Agenda
  • 3. Continuous Integration How good is our code? I think it’s pretty good… Does the code work? I tested it, it seems to do what it should… Does the code have bugs? I hope not…
  • 4. Continuous Integration Need to simplify complex integration of code Need a good criteria for measuring our code quality Need to have “Self-testing” code
  • 5. “a software development practice where members of a team integrate their work frequently, leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Continuous Integration
  • 6. Developer checks in new code An automated build is kicked off with all latest code changes Unit tests and [optional] other tools are executed Developer receives a notification if the build succeeded or failed [optional] Failing commits are rejected from the source code repository Continuous Integration
  • 7. The code should build directly from source control The code should be built in a single automated command This makes it easier in multiple scenarios: New developer joins the team Code is built automatically on a build server Automated Builds
  • 8. Build script can be created using standard technologies MSBuild Batch file Multiple build configurations should be defined “Small” build that runs on every check in Should be very fast “Big” build that runs nightly Can have a bigger scope (build MSI, run integration tests) Automated Builds
  • 9. Many tools can be integrated into the build process Some examples (.NET): Code Coverage – Coverage (in %) by unit tests. Code Duplications – find duplicated code Code Analysis StyleCop – Find styling errors in code FXCop – Static code analysis Tools
  • 10. Tools – Code Coverage
  • 11. Tools – Code Coverage
  • 12. Define a set of styling rules: These can be run from the IDE or from a build script Show warnings/errors when compiling: Tools - StyleCop
  • 13. Many tools can be integrated into the build process Some examples (.NET): Code Coverage – Coverage (in %) by unit tests. Code Duplications – find duplicated code Code Analysis StyleCop – Find styling errors in code FXCop – Static code analysis Tools – FXCop
  • 14. Older VCS tools are centralized (central server model) Subversion, ClearCase Centralized tools suffer from a few issues: Network latency (server needed for most operations). Submitting “half-ready” code can break other people’s work. DVCS (Git)
  • 15. Many modern VCS tools are distributed This means a central server is optional Each developer gets a copy of the entire repository A central server can still be setup Used as a sync point for team members DVCS (Git)
  • 16. Git offers a command line tool (comes from Linux) On Windows: Shell Extension Visual Studio integration using plugins DVCS (Git)
  • 19. CI Implementation #1 CI Server Source Control (Git) TeamCity Build Agent CI Build Nightly Build
  • 20. CI Implementation #1 What we gained: Basic framework for more complicated tasks Source control contains a “clean” copy of the code Fast notification on build issues Starting to incorporate basic unit tests Installer (.MSI) creation is automatic Using a modern source control system (Git)
  • 21. CI Implementation #2 CI Server Git CI Build Build Agent Build Agent Build Agent … Nightly Build VM Server Win7 x64 Win7 Win XP …

Notas do Editor

  1. This presentation’s title is “Continuous Integration” and is meant for introducing the basic concepts of CI to a development team.As CI is tightly related to other concepts (such as automated builds, unit testing), these will be brought here as well.
  2. Main agenda for this presentation.Continuous Integration is directly tied with other concepts such as unit testing, automated build and tools that perform various verifications to maintain high code quality.Although not directly related, I’d like to present Git and its advantages as a Distributed version control system (DVCS).
  3. One problem with measuring how ‘good’ a code project is, is that often the measurement is objective and not based on solid data.Team members integrate their work not often enough, leading to complex merging and integration of their work.Lack of code that tests the codebase (unit tests) brings us to a state that we “believe” our code is working, however as we progress and the project becomes more complex, we cannot be certain that everything is works as expected.
  4. What we would like to achieve is:Have criteria to tell us if our project is doing good.Integrate often to prevent complicated integration points between developers on a team.Create small pieces of code that test and exercise the code of the project we’re working on.
  5. Definition of Continuous Integration, as brought by Martin Fowler’s essay on the subject.The full essay can be found here: http://martinfowler.com/articles/continuousIntegration.html
  6. Without CI, a developer had to update to latest code before committing, and verify (locally) that all source code compiles and tests are OK.Using CI, the build server will build the project from the latest code checked in, and report if anything went wrong.Typically this is done quickly enough (recommended is less than 10 minutes).
  7. Automated builds are what allows CI to be effective.It is essential that the entire project can be built using some script in a single command.Setting this up involves a few other steps, such as keeping ALL files related to building the project under source control (for example, external 3rd party libraries, configuration files, images, etc.).This removes the need to do manual work that only certain team members have or the risk of a human error when running any manual step.This also has an added value that new team members can directly build the project without installing any software on their environments, and build servers do not need any special prerequisite software for running a build.
  8. Multiple technologies exist for constructing a build script (simple batch files, MSBuild, Nant).Upon check in (commit) to the source control system, the smallest subset of actions need to be performed, in order to deliver results as fast as possible.To this end, it is typical to set up multiple building scenarios that are invoked at different times. For example, a “small” build runs for every check in to source control.Every night a “Full” build runs that builds an MSI, documentation runs an extensive test suite, etc.
  9. These are examples of tools that are very easy to integrate into the build.Some of them ship with an MSBuild task to be directly invoked from a build script.Most also integrate well into popular CI server software.
  10. Code coverage shows in numbers how much of the code is actually covered.A typical scenario for this is when running unit tests, monitoring the actual code that runs during the tests.This generates a report of how much of the codebase was actually exercised during unit testing.A report is presented showing how many classes were used, methods were called, etc.
  11. Source code highlighting shows which lines of code get called or not.This can also be integrated into the IDE (Visual Studio) to show what part of the code was used.Areas shown in red should be exercised by a unit test.
  12. StyleCop is a tool that scans the code, enforcing a set of predefined rules.There are many styling rules, not all of them are mandatory for a consistent and high quality code.Once a set of rules is defined, it is stored in a StyleCop.settings file.This file can be placed at the root folder of a project, affecting all folders under it.StyleCop can be configured to output build errors instead of warnings. This can ensure all code checked into the source control repository is consistent with the team’s rules.
  13. These are examples of tools that are very easy to integrate into the build.Some of them ship with an MSBuild task to be directly invoked from a build script.Most also integrate well into popular CI server software.
  14. Older generation VCS tools were mostly centralized. A central server used to hold the master repository.Every action had to pass through this server, making it potentially slow, depending on the networking protocol used, and the proximity to the server.
  15. Modern tools like Git and Hg are distributed.Every developer gets a copy of the entire repository, maintaining it locally.A central server can be setup to sync between team members.In this method, a developer can develop a new feature locally, check in changes as he makes progress.When the code reaches a certain stage where it’s stable enough, the developer can submit (push) the changes to a central server, making it visible for other team members.
  16. Git originates from Linux.On Windows, It can be used in various different ways:Command line interface.Shell (explorer) extensionVisual Studio integration.
  17. Central server, developers access and update it.Taken from: http://progit.org/book/ch5-1.htmlIn centralized systems, there is generally a single collaboration model—the centralized workflow. One central hub, or repository, can accept code, and everyone synchronizes their work to it. A number of developers are nodes — consumers of that hub — and synchronize to that one place (see Figure 5-1).This means that if two developers clone from the hub and both make changes, the first developer to push their changes back up can do so with no problems. The second developer must merge in the first one’s work before pushing changes up, so as not to overwrite the first developer’s changes. This concept is true in Git as it is in Subversion (or any CVCS), and this model works perfectly in Git.If you have a small team or are already comfortable with a centralized workflow in your company or team, you can easily continue using that workflow with Git. Simply set up a single repository, and give everyone on your team push access; Git won’t let users overwrite each other. If one developer clones, makes changes, and then tries to push their changes while another developer has pushed in the meantime, the server will reject that developer’s changes. They will be told that they’re trying to push non-fast-forward changes and that they won’t be able to do so until they fetch and merge. This workflow is attractive to a lot of people because it’s a paradigm that many are familiar and comfortable with.
  18. Taken from: http://progit.org/book/ch5-1.html#integrationmanager_workflowBecause Git allows you to have multiple remote repositories, it’s possible to have a workflow where each developer has write access to their own public repository and read access to everyone else’s. This scenario often includes a canonical repository that represents the “official” project. To contribute to that project, you create your own public clone of the project and push your changes to it. Then, you can send a request to the maintainer of the main project to pull in your changes. They can add your repository as a remote, test your changes locally, merge them into their branch, and push back to their repository. The process works as follow (see Figure 5-2):The project maintainer pushes to their public repository.A contributor clones that repository and makes changes.The contributor pushes to their own public copy.The contributor sends the maintainer an e-mail asking them to pull changes.The maintainer adds the contributor’s repo as a remote and merges locally.The maintainer pushes merged changes to the main repository.This is a very common workflow with sites like GitHub, where it’s easy to fork a project and push your changes into your fork for everyone to see. One of the main advantages of this approach is that you can continue to work, and the maintainer of the main repository can pull in your changes at any time. Contributors don’t have to wait for the project to incorporate their changes — each party can work at their own pace.
  19. For first implementation, an automated build + CI server is setup.Software used:Source Control – GitCI – TeamCity (free for small teams)Build Agent is on the same server as TeamCity. This is the actual component that runs the build. For scalability, many agents can be deployed on additional servers, making it possible to have multiple concurrent builds.Two build configurations are created:CI Build – triggered on every check in to the source control. Very quick (~ 1 minute).Nightly Build – slightly longer, also builds an installer using NSIS build script (~ 5 minutes).
  20. Implementation #1 is not perfect yet, but it gives us a solid framework to build upon.Tasks that were manual before (such as creating an installer) are replaced with a 1-click automatic, repeatable action.A developer submitting new code can receive in ~ 1 minute a notification that his code passed some basic tests and is considered good.
  21. Second implementation expands on the first one.In this example, more build agents are introduced, and can accommodate more concurrent builds by a larger development team.After passing all initial tests, a build is passed on to a VM server, where it is automatically deployed to virtual machines, according to the needs of the built applications.For example, a client application can be deployed to multiple client operating systems, where a set of automated integration tests occur.