IT and Technology DevOps & Automation 1 — Questions and Answers
Question 1: What is the primary purpose of a CI/CD pipeline in software development?
- To automate building, testing, and deploying code changes (Correct answer)
- To manually review code before release
- To store source code in version control
- To monitor production server uptime
Correct answer: To automate building, testing, and deploying code changes
A CI/CD pipeline automates the steps of integrating, testing, and deploying code so teams can release software faster and more reliably.
Question 2: Which tool is most commonly used for container orchestration in a DevOps environment?
- Ansible
- Kubernetes (Correct answer)
- Jenkins
- Terraform
Correct answer: Kubernetes
Kubernetes is the industry-standard platform for automating deployment, scaling, and management of containerized applications.
Question 3: In infrastructure as code (IaC), what does Terraform primarily manage?
- Application source code versions
- Cloud and on-premises infrastructure resources (Correct answer)
- Container images
- CI/CD pipeline stages
Correct answer: Cloud and on-premises infrastructure resources
Terraform uses declarative configuration files to provision and manage infrastructure across multiple cloud providers.
Question 4: What does 'shift-left' mean in a DevSecOps context?
- Moving security testing earlier in the development lifecycle (Correct answer)
- Migrating servers to the left data center rack
- Shifting developer responsibilities to operations
- Deploying to staging before production
Correct answer: Moving security testing earlier in the development lifecycle
Shift-left means integrating security checks into early development stages rather than waiting until after deployment.
Question 5: Which version control workflow uses short-lived feature branches merged frequently into main?
- Gitflow
- Trunk-based development (Correct answer)
- Forking workflow
- Release branching
Correct answer: Trunk-based development
Trunk-based development keeps branches small and short-lived, merging to a single main branch frequently to reduce integration conflicts.
Question 6: What is the role of an artifact repository like JFrog Artifactory or Nexus in a CI/CD pipeline?
- Running automated unit tests
- Storing and versioning built packages and dependencies (Correct answer)
- Monitoring application performance
- Managing cloud infrastructure state
Correct answer: Storing and versioning built packages and dependencies
Artifact repositories store compiled binaries, libraries, and Docker images so they can be versioned, shared, and promoted through deployment stages.
What is the primary purpose of a CI/CD pipeline in software development?