CI/CD Interview Questions Flashcards

1
Q

What are some common CI/CD issues? #5

A

Slow Build TImes
Limited Test Coverage
Inconsistent Environments
Integration Issues
Lack Of Visibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Slow build times: caused by factors like large code bases, inefficient build scripts, or slow testing frameworks. Solutions include: #3

A

Breaking the build into smaller stages
Optimizing build scripts
Use the Parallel testing framework.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Limited test coverage: occurs when tests are not properly written or comprehensive enough. Solutions include: #2

A

Writing more tests
Using code coverage tools,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Inconsistent environments are caused when the dev, staging, and prod environments are not synced properly. Solutions include: #3

A

Infrastructure-as-code tools
Containerization
Configuration management tools to ensure consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Integration issues occur when there are issues with integrating different system components. Solutions include: #2

A

Using API testing tools

Service virtualization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

API testing tools can be used to validate that different

A

components of the system are communicating correctly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Contract testing can be used to ensure that APIs are

A

compatible and meet the required specifications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Service virtualization can be used to simulate the behavior of components that are not yet available, which can help to

A

identify and address integration issues before they become critical.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Lack of visibility: occurs when there is not enough information available about the state of the system or the progress of the build. Solutions include:

A

Solutions include using
Monitoring tools
Logging tools
Dashboarding tools to get more visibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can you walk me through the components of a typical code release pipeline?

A

A typical code release pipeline consists of several stages, including building, testing, staging, deploying, and monitoring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Stages of CI/CD

The first stage involves building the code into a

A

deployable artifact, such as a JAR file or a Docker image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The second stage involves running various types of tests on the artifact, such as

A

unit tests, integration tests, and functional tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The third stage involves deploying the artifact to a

A

staging environment for further testing and validation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The fourth stage involves deploying the artifact to

A

production, which may involve rolling updates or blue-green deployments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The fifth stage involves monitoring the production system for

A

issues and collecting metrics for analysis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Have you implemented process automation using scripting tools such as bash? Can you provide an example of a script you have written?

A

One example of a bash script I have written is a script that automates the deployment of a web application to a Linux server. The script pulls the latest code from the repository, builds the application, and deploys it to the server.

17
Q

Troubleshooting full stack implementations #4

A
  • look at the logs for the web or application server to see if there are any errors or issues
  • Use tools like Wireshark and Fiddler to capture network traffic and analyze it for issues
  • If I suspect an issue with the database, I may look at the query logs and use tools such as SQL Profiler to capture and analyze queries.
  • Ultimately, the goal is to isolate the issue and identify the root cause, so that it can be fixed.
18
Q

Can you give an example of how you have collaborated with architects to deliver infrastructure design? #3

A
  • Define requirements for infrastructure (scalability, availability, security)
  • Work together to design architecture, selecting appropriate technologies and services
  • Ensure infrastructure design meets non-functional requirements such as performance and reliability.
19
Q

What is your experience with release management processes? How have you ensured that code changes are properly tested and deployed to production? #4

A
  • Set up CI/CD pipeline for automatic building, testing, and deployment of code changes
  • Before code changes are deployed to production, they undergo various types of testing, such as unit tests, integration tests, and load tests.
  • Use tools like code reviews and static analysis to ensure code quality
  • Implement release gates to enforce policies, such as requiring a certain level of test coverage
20
Q

Security Vulnerabilities that come with CI/CD pipeline and solutoins?
Irregularity is detected
Hardcodigng Sensetive Data

A

An effective monitoring system that will lock down certain sections within the pipeline if an irregularity is detected. The sooner that a security threat is noticed, the more likely you will be able to defend your pipeline from the threat.

focuses on every section of your pipeline can ensure that an effectual security level is always maintained.

21
Q

Performance Issues that come with CI/CD pipeline and solutoins?

A
  • Performance testing can detect bottlenecks and other bugs that could create huge drops in performance.
  • Load simulation testing
22
Q

What is continuous integration?

A

developers merge their changes to the main branch many times per day.

CI is supported by automated tests and a build server that runs them on every change.

23
Q

Main benefit of Continuous integration?

A

Failures are made visible as soon as they are introduced and can be fixed within minutes

24
Q

How do CI and version control relate to one another?

A

Every change in the code must trigger a continuous integration process. This means that a CI system must be connected with a Git repository to detect when changes are pushed, so tests can be run on the latest revision.

25
Q

What’s the difference between continuous integration, continuous delivery, and continuous deployment?

A

Continuous integration (CI) executes the sequence of steps required to build and test the project. CI runs automatically on every change committed to a shared repository, offering developers quick feedback about the project’s state.

Continuous delivery is an extension of CI. Its goal is to automate every step required to package and release a piece of software. The output of a continuous delivery pipeline takes the form of a deployable binary, package, or container.

Continuous deployment is an optional step-up from continuous delivery. It is a process that takes the output from the delivery pipeline and deploys it to the production system in a safe and automated way

26
Q

What are the most important characteristics in a CI/CD platform? #4

Reliability:
Speed:
Reproducibility:
Ease of use:

A

Reliability: the team depends on the CI server for testing and deployment, so it must be reliable. An unreliable CI/CD platform can block all development work.
Speed: the platform should be fast and scalable to obtain results in a few minutes.
Reproducibility: the same code should always yield the same results.
Ease of use: easy to configure, operate, and troubleshoot.

27
Q

What is the build stage?
The build stage is responsible for building the

A

container, or executable program for the project. This stage validates that the application is buildable and provides a testable artifact.

28
Q

Can you name some deployment strategies? #3

A

Regular release/deployment:
Canary releases:
Blue-green releases

29
Q

Deployment strategies

What is the difference between Regular release/deployment and Canary releases?

A

Regular release/deployment: releases software to everyone at once, making it available to the general public.

Canary releases: this is a method that reduces the chance of failure by exposing a small portion of the userbase (around 1%) to the release. With a canary release, developers gradually switch users to the latest release in a controlled way.

30
Q

Deployment strategies

Explain what a Blue-green releases strategty is.

A
  • Two identical environments for software, one currently in use (blue) and one not in use (green).
  • A new version of the software is installed in the unused green environment and tested.
  • If everything looks good, the live environment is switched from blue to green. If there are problems, the switch can be quickly reversed.
31
Q

How does testing fit into CI?

A

The main benefit teams get from CI is continuous feedback.

32
Q

Name the common typed of testing used in CI/CD?
#6 (3 start with S)

A

Unit tests:
Integration tests:
End-to-end tests:
Static tests:
Security tests:
Smoke tests:

33
Q

Unit tests:

A

validate that functions or classes behave as expected.

34
Q

Integration tests:

A

Integration tests: are used to verify that the different components of an application work well together.

35
Q

End-to-end tests:

A

End-to-end tests: check an application by simulating user interaction.

36
Q

Static tests:

A

Static tests: finds defects in code without actually executing it.

37
Q

Security tests:

A

Security tests: scans the application’s dependencies for known security issues.

38
Q

Smoke tests:

A

Smoke tests: fast tests that check if the application can start and that the infrastructure is ready to accept deployments

38
Q

Smoke tests:

A

Smoke tests: fast tests that check if the application can start and that the infrastructure is ready to accept deployments