Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesEasy
A DevOps team is developing a microservices-based application using Azure Kubernetes Service (AKS). Each microservice has its own Git repository and a dedicated Azure Pipeline for CI/CD. The team needs to ensure that when a change is committed to the main branch of any microservice, its corresponding pipeline automatically triggers, builds the Docker image, and updates the deployment in AKS. Which type of trigger should be configured in each microservice's Azure Pipeline?
- ACI trigger
- BPull request trigger
- CScheduled trigger
- DManual trigger
Show answer & explanationAnswer & explanation
Correct answer: A. CI trigger
A CI (Continuous Integration) trigger is designed to automatically start a pipeline whenever a change is pushed to a specified branch in a Git repository, which directly matches the requirement of triggering a pipeline upon commit to the main branch.
Why the other options are wrong
- B. Pull request triggers run pipelines when a pull request is created or updated, typically for validation before merging.
- C. Scheduled triggers run pipelines at specific times, not in response to code commits.
- D. Manual triggers require a user to explicitly start the pipeline, which does not meet the 'automatically triggers' requirement.
CI Trigger (Azure Pipelines)
A configuration in Azure Pipelines that automatically starts a pipeline build and deployment process whenever new code is pushed to a specified branch in a Git repository.
- Automates pipeline execution on code changes.
- Configurable for specific branches (e.g., 'main').
- Essential for Continuous Integration.
- Helps maintain code quality and rapid feedback.
Memory trick: Triggers are like the pipeline's alarm clock, telling it when to start.