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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are benefits of CI?

A
  1. Scaling
  2. Improved feedback loop
  3. Enhanced Communication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Ways to reduce time-to-market:

A
  • Faster delivery of changes
  • Enhanced efficiency
  • Improved code quality and quick recovery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Advantages provided by CI Server:

A
  1. Automated test - immediate feedback and better quality
  2. Better collaboration - integrity
  3. Streamlined workflow - devs work on multiple layers of S/W app
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Strategies for CD:

A
  • Culture
  • Automation Platform
  • App Architecture
  • Security
  • Insights
  • Delivery Strategies
  • Monitoring and feedback
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Benefits of using CI/CD:

A
  • Faster time to market
  • Reduced risk
  • Shorter review time
  • Better code quality
  • Smoother path to production
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Stages in designing a CI/CD pipeline:

A
  1. Source
  2. Build
  3. Test
  4. Deploy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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:
    1. Select
    2. Decide
    3. Create
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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:
    1. Determine CI server (Jenkins, Circle CI, GitHub action, Jenkins X, Azure pipelines)
    2. Set up pipeline-as-code in VCS, to trigger
    3. Build source code, like a Docker image
    4. Use provided plugins for static analysis and style code to maintain code consistency
    5. Versioned and built artifact deployed in artifact registry for testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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:
    1. Choose a plugin (JUnit)
    2. Publish test reports
    3. Maintain a predetermined benchmark
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Deploy stage?

A
  • aim to deliver and deploy final build
  • also used to add resources
  • Steps:
    1. Choose app deployment strategy (blue-green, canary or rolling)
    2. Use the infrastructure-as-code (IaC) like terraform or Azure resource manager template
    3. Look for configuration management tools (Ansible, Puppet)
    4. Select tools that perform both cloud resource deployments and app release strategies