V I K A S G U P T A
Continuos Integration Patterns
Continuous Integration
 Process of building software with every change
committed to a project’s version control repository
Build Patterns
Common Build Patterns
 Automated Build
 Binary Integrity
 Dependency Management
 Consistent Directories
 Staged Builds
Private Build
 Perform a private build prior to committing changes
the repository
Private Build
 Perform a private build prior to committing changes
the repository
Integration Build
 Periodically run the integration build
 WOMM
Continuous Feedback
 Send automatic feedback from CI server to
development team
 Prevent spam
Expeditious Fixes
 Fix build errors as soon as they come
 If the build is failing, don’t update
Developer Documentation
 Generate documentation from build
Build Configuration Patterns
Independent build
 Separate build from IDE
 Build should run from command line
Single Command
 All build and deployment should be run from single
command
 Should not need multiple commands to deploy
Dedicated Machine
 Separate Machine for builds
 WOMM
Externalize Configuration
 Use build-time properties
Database
Externalize Configuration
 Script all database actions
 Late and manual migration is painful
 Add database configuratio...
Database Sandbox
 Create a lightweight version of your database
 Use lightweight database on developer machines
 Don’t ...
Database Upgrade
 Use scripts to upgrade the database in each
environment
 Don’t manually apply changes in each target
e...
Testing and Code Quality
Database Upgrade
 Automated Tests
 Categorize Tests
 Continuous Inspection
 Build threshold
Deployment
Deployment Patterns
 Scripted Deployment
 Headless Execution
 Unified Deployment
 Disposable Container
 Environment r...
Thanks
Upcoming SlideShare
Loading in …5
×

Continuos integration patterns

3,065 views
3,314 views

Published on

Published in: Education, Technology, Sports
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,065
On SlideShare
0
From Embeds
0
Number of Embeds
2,267
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Binary Integrity: Same package should be deployed on each environment. Separate build process should not be deployment on each environment.Consistent Directories: Create a simple, yet well-defined directory structure to optimize software builds and increase cross-project knowledge transfer. Anti-Patterns Putting code, documentation and large files in the same parent directory structure, leading to long-running builds.
  • Private Workspace : Develop software in private workspace to isolate changesRepository: Commit all files to a version control repositoryMainline:
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • WOMM: Works on my machine
  • Categorize: Categorize into unit, integrate, UI, etc. Helps in having targeted builds.Build Threshold: Notify team members of code aberrations such as low code coverage or high cyclomatic complexity. Fail a build when a project rule is violated. Use continuous feedback mechanisms to notify team members.
  • Headless ExecutionPattern Securely interface with multiple machines without typing a command. Anti-Patterns People manually access machines by logging into each of the machines as different users; then they copy files, configure values, and so on. Unified DeploymentPattern Create a single deployment script capable of running on different platforms and target environments. Anti-Patterns Some may use a different deployment script for each target environment or even for a specific machine. Disposable ContainerAutomate the installation and configuration of Web and database containers by decoupling installation and configuration. Anti-Patterns Manually install and configure containers into each target environment. Remote DeploymentUse a centralized machine or cluster to deploy software to multiple target environments. Anti-Patterns Manually applying deployments locally in each target environment. Environment RollbackProvide an automated Single Command rollback of changes after an unsuccessful deployment. Anti-Patterns Manually rolling back application and database changes.
  • Continuos integration patterns

    1. 1. V I K A S G U P T A Continuos Integration Patterns
    2. 2. Continuous Integration  Process of building software with every change committed to a project’s version control repository
    3. 3. Build Patterns
    4. 4. Common Build Patterns  Automated Build  Binary Integrity  Dependency Management  Consistent Directories  Staged Builds
    5. 5. Private Build  Perform a private build prior to committing changes the repository
    6. 6. Private Build  Perform a private build prior to committing changes the repository
    7. 7. Integration Build  Periodically run the integration build  WOMM
    8. 8. Continuous Feedback  Send automatic feedback from CI server to development team  Prevent spam
    9. 9. Expeditious Fixes  Fix build errors as soon as they come  If the build is failing, don’t update
    10. 10. Developer Documentation  Generate documentation from build
    11. 11. Build Configuration Patterns
    12. 12. Independent build  Separate build from IDE  Build should run from command line
    13. 13. Single Command  All build and deployment should be run from single command  Should not need multiple commands to deploy
    14. 14. Dedicated Machine  Separate Machine for builds  WOMM
    15. 15. Externalize Configuration  Use build-time properties
    16. 16. Database
    17. 17. Externalize Configuration  Script all database actions  Late and manual migration is painful  Add database configuration scripts to SCM tool
    18. 18. Database Sandbox  Create a lightweight version of your database  Use lightweight database on developer machines  Don’t use shared database for development
    19. 19. Database Upgrade  Use scripts to upgrade the database in each environment  Don’t manually apply changes in each target environment
    20. 20. Testing and Code Quality
    21. 21. Database Upgrade  Automated Tests  Categorize Tests  Continuous Inspection  Build threshold
    22. 22. Deployment
    23. 23. Deployment Patterns  Scripted Deployment  Headless Execution  Unified Deployment  Disposable Container  Environment rollback
    24. 24. Thanks

    ×