DevOps CI/CD Pipelines 1 — Questions and Answers
Question 1: What does CI stand for in the context of DevOps?
- Continuous Integration (Correct answer)
- Continuous Inspection
- Continuous Infrastructure
- Continuous Implementation
Correct answer: Continuous Integration
CI stands for Continuous Integration, the practice of frequently merging code changes into a shared repository with automated builds and tests.
Question 2: Which of the following is the primary goal of Continuous Delivery (CD)?
- Ensure software can be released to production at any time (Correct answer)
- Automatically deploy every commit to production
- Run unit tests on every commit
- Monitor production environments continuously
Correct answer: Ensure software can be released to production at any time
Continuous Delivery ensures the software is always in a deployable state so it can be released to production at any time with a manual approval step.
Question 3: In a Jenkins pipeline, what file defines the pipeline-as-code configuration?
- Jenkinsfile (Correct answer)
- pipeline.yaml
- build.xml
- ci-config.json
Correct answer: Jenkinsfile
A Jenkinsfile is a text file stored in the repository that defines the Jenkins pipeline using either Declarative or Scripted pipeline syntax.
Question 4: What is a 'blue-green deployment' strategy?
- Running two identical production environments and switching traffic between them (Correct answer)
- Deploying to a subset of servers first then rolling out gradually
- Using blue containers for staging and green containers for production
- Deploying canary builds to test new features
Correct answer: Running two identical production environments and switching traffic between them
Blue-green deployment maintains two identical production environments where one is live (blue) and the other receives the new deployment (green), then traffic is switched.
Question 5: Which Git branching strategy is most commonly associated with CI/CD pipelines?
- Trunk-based development (Correct answer)
- Git Flow
- Feature branching
- Forking workflow
Correct answer: Trunk-based development
Trunk-based development, where all developers commit to a single main branch frequently, best supports CI/CD by reducing merge conflicts and enabling rapid integration.
Question 6: What is the purpose of a 'pipeline artifact' in CI/CD?
- A built output (binary, JAR, Docker image) produced by one stage and consumed by another (Correct answer)
- A log file generated during pipeline execution
- A configuration file that defines pipeline variables
- A test report generated after running unit tests
Correct answer: A built output (binary, JAR, Docker image) produced by one stage and consumed by another
Pipeline artifacts are built outputs like binaries or container images produced by one stage and passed downstream to subsequent stages such as testing or deployment.
What does CI stand for in the context of DevOps?