ASP.NET Core Interview Question #218

What is CI/CD for an ASP.NET Core application?

Testing, Deployment & Hosting Senior Advanced

Quick Interview Answer

Continuous Integration (CI) automatically validates changes by restoring dependencies, building the solution, and running tests. Continuous Delivery or Deployment extends the pipeline to produce versioned artifacts and move them through deployment environments.

Detailed Explanation

Continuous Integration (CI) automatically validates changes by restoring dependencies, building the solution, and running tests. Continuous Delivery or Deployment extends the pipeline to produce versioned artifacts and move them through deployment environments.

A strong pipeline makes deployments repeatable and auditable. It can also run security scanning, static analysis, migration checks, smoke tests, and environment approvals.

Secrets should be stored in the CI/CD platform's protected secret mechanism rather than committed to the repository.

Code Example

# Typical pipeline stages
dotnet restore
dotnet build --configuration Release --no-restore
dotnet test --configuration Release --no-build
dotnet publish --configuration Release --no-build -o publish