AZ-400 · Question #382
Hotspot Question You plan to build an app named App1 by using GitHub. You need to recommend a build and deployment solution for App1. The solution must meet the following requirements: - Ensure that t
This question tests knowledge of GitHub Actions workflows and deployment protection rules used to control code testing triggers and build approval gates in a CI/CD pipeline.
Question
Exhibit
Answer Area
- Ensure that the code for App1 is submitted for testing only when a build has completed successfully:EnvironmentsJobsMatricesPackagesPull requests
- Ensure that a build is approved by the change management team before the build is released:EnvironmentsJobsMatricesPackagesPull requests
Explanation
This question tests knowledge of GitHub Actions workflows and deployment protection rules used to control code testing triggers and build approval gates in a CI/CD pipeline.
Approach. For the first requirement (ensuring code is submitted for testing only when a build completes successfully), you should use a GitHub Actions workflow with a job dependency using 'needs' keyword or configure a workflow trigger on 'workflow_run' with status 'completed' and conclusion 'success' - this ensures the test job only runs after a successful build job. For the second requirement (ensuring a build is approved before release), you should use GitHub Environments with required reviewers (Environment Protection Rules) - this pauses the deployment workflow and requires manual approval from designated reviewers (the change management team) before the build proceeds to the release/production environment.
Concept tested. GitHub Actions CI/CD pipeline design, specifically job dependencies ('needs' keyword or workflow_run triggers for sequential job execution) and GitHub Environment Protection Rules with required reviewers for manual approval gates before deployment.
Topics
Community Discussion
No community discussion yet for this question.
