introduction to continuous integration
DESCRIPTION
Introduction to Continuous IntegrationTRANSCRIPT
![Page 1: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/1.jpg)
Continuous Integration with Jenkins
![Page 2: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/2.jpg)
Goals
Push code
Push code
Review code
Build on push
Daily build
Test on push
Nightly regression
Performance testing
![Page 3: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/3.jpg)
About Trainer
![Page 4: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/4.jpg)
Introduce Yourself 2 minutes
![Page 5: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/5.jpg)
What is your Continuous Integration ?
![Page 6: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/6.jpg)
What is your CI system ?
No Build Server
Nightly Build
Automated Build with
Basic Automated Test
Use Metrics
More About Testing
Automated Acceptance
Testing
Continuous Deployment
Continuous Delivery
![Page 7: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/7.jpg)
![Page 8: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/8.jpg)
Stressful Releases
![Page 9: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/9.jpg)
![Page 10: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/10.jpg)
What is CI ?• Continuous Integration !!!
• Automated Everything
• Build as often as possible
• Build early and often
• e.g. On every commit/nightly build
![Page 11: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/11.jpg)
What is CI ?• Not just technical
• Organization and culture
![Page 12: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/12.jpg)
What is CI ?• Software development practice
• What people do, not about what tools
• Integrate frequently
• Fast feedback
![Page 13: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/13.jpg)
Benefit of CI• Fewer error/Reduce risks
• Fast feedback
• Much less manual testing
• Regression test without additional effort
• Generate deployable software
• Great confidence in the product
![Page 14: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/14.jpg)
อะไรที่ไม่ใ่ CI• Nightly build
• Developer branch
• Scheduling integration point
• Building via IDE
![Page 15: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/15.jpg)
![Page 16: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/16.jpg)
CI Practices1. Maintain a single source repository
2. Automate the build
3. Make your build self-test
4. Everyone commit to the mainline everyday
5. Every commit should build the mainline on integration machine
6. Keep the build fact
7. Test in a clone of the production environment
8. Make it easy for everyone to get the latest executable
9. Everyone can see what is happen
10.Automate deployment
![Page 17: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/17.jpg)
Single Source Repository• Single point of truth
• Everyone’s code in the same place
• NOT a branch per developer
• Shared ownership
![Page 18: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/18.jpg)
Automate Build• IDE is not automating !!
• Use build tool
• Compile, package and test
![Page 19: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/19.jpg)
Self-testing Build• Direct from source to running build
• No manual copy
• No click
• No edit config file
![Page 20: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/20.jpg)
Self-testing Build• Test with
• Unit tests
• Functional tests
• Performance tests
![Page 21: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/21.jpg)
Self-testing Build• Responsible persons should be notified when
anything fails
• Test web in more browser
![Page 22: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/22.jpg)
Commit More Often• At lease one per hour
• Need small unit of work
• To commit cleanly you need to update first
![Page 23: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/23.jpg)
Every Commit Build• It’s all about fast feedback
• Small changes
• Less to merge or fix
![Page 24: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/24.jpg)
Publish Latest Distributable• Make it easy to get final product
• Should only build once
• Configuration is separate
![Page 25: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/25.jpg)
Test in Production Clone• Detect multi-thread, cluster, load balance issue
• Test system architecture
• Real database
![Page 26: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/26.jpg)
Keep Build Fast• It’s all about feedback
• If thing break you find out about it, fresh in your mind
• Keep up with frequent commit
![Page 27: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/27.jpg)
Everyone See What’s Happening
• Reduce time to fix
• No excuse to commit on broken build
• It’s not about blame, it about feedback
![Page 28: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/28.jpg)
Automate Deployment• Reduce human error
• Verify can run on somewhere other than “My Machine”
• Test not only on code, but deployment process too
• Don’t tie up System Administrators with boring stuff
• Don’t tie up Developers waiting for feedback
![Page 29: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/29.jpg)
Make CI Work• Can not done in isolation
• Pick the right tool for the right job
• It’s not silver bullet
![Page 30: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/30.jpg)
Build Pipeline
![Page 31: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/31.jpg)
Traditional CI Flow
![Page 32: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/32.jpg)
Build Pipeline Flow
![Page 33: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/33.jpg)
One Click Deploys• Require the Build pipelines
• Reduce deployment time and risk
• Make go live a non-event
![Page 34: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/34.jpg)
History
![Page 35: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/35.jpg)
Summary• CI and Build pipeline improve
• Quality
• Time to market
• Confidence
• Continuous Deployment/Delivery is the next step
• Require Developers and System Administrator to work closely together
![Page 36: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/36.jpg)
3 persons/group
![Page 37: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/37.jpg)
Your Build Pipeline
?
![Page 38: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/38.jpg)
Build/Deployment Pipeline
1. Clean 2. Checkout3. Download
Library4. Compile
5. Package 6. Setup DB 7. Run Test 8. Deploy
![Page 39: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/39.jpg)
How to Self-Testing ?
![Page 40: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/40.jpg)
What is Jenkins ?• Continuous Integration Server
• Opensource
• A lot of useful plugin
• Well document
• Active community
![Page 41: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/41.jpg)
Goals
Push code
Push code
Review code
Build on push
Daily build
Test on push
Nightly regression
Performance testing
![Page 42: Introduction to Continuous Integration](https://reader033.vdocuments.mx/reader033/viewer/2022042623/54b70b024a7959a8588b4573/html5/thumbnails/42.jpg)
Let’s Go !!!