• +91 9723535972
  • info@interviewmaterial.com

CI-CD Interview Questions and Answers

Related Subjects

CI CD Interview Questions and Answers

Question - 41 : - How long should a branch live?

Answer - 41 : -

In the context of continuous integration, branches should follow trunk-based development practices and thus be short-lived. Ideally, a branch should last for a few hours or, at most, a day.

Question - 42 : - What is continuous integration?

Answer - 42 : -

Continuous Integration (CI) is a software development methodology where developers — following the trunk-based model — 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. As a result, failures are made visible as soon as they are introduced and can be fixed within minutes.

Question - 43 : - How do CI and version control relate to one another?

Answer - 43 : -

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.

Question - 44 : - Name some benefits of CI/CD

Answer - 44 : -

  • Less risk: automated tests reduce the chance of introducing bugs, creating a safety net that increases the developer’s confidence in their code.
  • More frequent releases: the automation provided by continuous delivery and continuous deployment allows developers to release and deploy software safely many times per day.
  • Improved productivity: freed from the manual labor of building and testing the code, developers can focus on the creative aspects of coding.
  • Elevated quality: CI acts as a quality gate, preventing code that is not up to standards from getting released.
  • Better design: the iterative nature of continuous integration lets developers work in small increments, allowing a higher degree of experimentation, which leads to more innovative ideas.

Question - 45 : - What are the most important characteristics in a CI/CD platform?

Answer - 45 : -

  • 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.

Question - 46 : - What is the build stage?

Answer - 46 : -

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

Question - 47 : - What’s the difference between a hosted and a cloud-based CI/CD platform?

Answer - 47 : -

A hosted CI server must be managed like any other server. It must be first installed, configured, and maintained. Upgrades and patches must be applied to keep the server secure. Finally, failures in the CI server can block development and stop deployments.

On the other hand, a cloud-based CI platform does not need maintenance. There’s nothing to install or configure, so organizations can immediately start using them. The cloud provides all the machine power needed, so scalability is not a problem. Finally, the reliability of the platform is guaranteed by SLA.

Question - 48 : - Is security important in CI/CD? What mechanisms are there to secure it?

Answer - 48 : -

Yes. CI/CD platforms have access to all kinds of sensitive data such as API keys, private repositories, databases, and server passwords. An improperly secured CI/CD system is a prime target for attacks and can be exploited to release compromised software or to get unauthorized access. A CI/CD platform must support mechanisms to securely manage secrets, and control access to logs and private repositories.

Question - 49 : - Can you name some deployment strategies?

Answer - 49 : -

  • 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.
  • Blue-green releases: consists of running two simultaneous instances of an application; one is the stable version currently serving users and the other the latest release. Users are switched from the former to the latter all at once. This method is safer than the regular or big bang releases because users can instantly be routed back to the previous version if there is a problem.
  • Dark launches: are deployments where new features are released without being announced. Features can be enabled in a very fine-grained way with feature flags.

Question - 50 : - How does testing fit into CI?

Answer - 50 : -

Testing is integral to and inseparable from CI. The main benefit teams get from CI is continuous feedback. Developers set up tests in the CI to check that their code behaves according to expectations. There would be no feedback loop to determine if the application is in a releasable state without testing.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners