Unit 3 - Continuous Integration and Test-Driven Development Flashcards
1
Q
What is continuous integration?
A
- a DevOps practice
- developers merge their updated code regularly in the central repo
- followed by automated and tests
- new code assessed before integration
- main objective: find bugs early
2
Q
What is the importance of CI?
A
- traditional way: delays bug identification, bug fixing and release
- disadvantages of isolated working: more time to merge code, detect bugs and fix them before time
3
Q
What are benefits of CI?
A
- Scaling
- Improved feedback loop
- Enhanced Communication
4
Q
Ways to reduce time-to-market:
A
- Faster delivery of changes
- Enhanced efficiency
- Improved code quality and quick recovery
5
Q
How to implement a CI process?
A
- install VCS
- developers push new code changes on VCS
- automated builds process
- automated testing
- error identification and bug fixes
6
Q
What is Code Repository Server?
A
- importance
- several source code repo hosts available
- BitBucket and GitHub
- Each hosting service has specified target user
- VCSs and repository hosting services difference
- repo hosting service dependency on VCS
7
Q
What is Continuous Integration Server
A
- also known as build server
- used to manage shared repos
- generates document of build results
- gives more control over source code, testing and commit process
- what if teams bypass the CI server?
- tools used as CI tools are CI servers
- Jenkins, GitLab CI, Circle CI
8
Q
Advantages provided by CI Server:
A
- Automated test - immediate feedback and better quality
- Better collaboration - integrity
- Streamlined workflow - devs work on multiple layers of S/W app
9
Q
What is Continuous Delivery?
A
- codes changes automatically tested for bugs and uploaded to code repo and then to test environment (production-like)
- minimal effort to deploy new code
- Traditional way and CD
- Steps involved: Functional testing, User acceptance testing, load testing and deployment
10
Q
Strategies for CD:
A
- Culture
- Automation Platform
- App Architecture
- Security
- Insights
- Delivery Strategies
- Monitoring and feedback
11
Q
Benefits of using CI/CD:
A
- Faster time to market
- Reduced risk
- Shorter review time
- Better code quality
- Smoother path to production
12
Q
Stages in designing a CI/CD pipeline:
A
- Source
- Build
- Test
- Deploy
13
Q
What is Source Stage?
A
- implemented using version control system
- pipeline instances are triggered by VCS based on events like push or pull, validation or new commits
- triggers scheduled by user
- collaborative work environment is established
- Steps:
- Select
- Decide
- Create
14
Q
What is Build Stage?
A
- deals with selection of CI server
- goal is to provide feedbacks to the developer on each commit to resolve issues like syntax error or compilation error
- maintain the build in deployable
- Steps:
- Determine CI server (Jenkins, Circle CI, GitHub action, Jenkins X, Azure pipelines)
- Set up pipeline-as-code in VCS, to trigger
- Build source code, like a Docker image
- Use provided plugins for static analysis and style code to maintain code consistency
- Versioned and built artifact deployed in artifact registry for testing
15
Q
What is Test Stage?
A
- Testing the code using some tools and publishing results along with production release
- goal is to ensure safe and working builds are released
- types of test performed: unit, integration and functional tests
- about unit, integration and functional testing
- Steps:
- Choose a plugin (JUnit)
- Publish test reports
- Maintain a predetermined benchmark