Learn how to configure GitHub workflows to ensure code is only tested after successful builds and released only with change management approval. Best practices for the AZ-400 certification exam.
Table of Contents
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 the code for App1 is submitted for testing only when a build has completed successfully.
- Ensure that a build is approved by the change management team before the build is released.
What should you include in the recommendation for each requirement? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Ensure that the code for App1 is submitted for testing only when a build has completed successfully:
- Environments
- Jobs
- Matrices
- Packages
- Pull requests
Ensure that a build is approved by the change management team before the build is released:
- Environments
- Jobs
- Matrices
- Packages
- Pull requests
Answer
Ensure that the code for App1 is submitted for testing only when a build has completed successfully: Jobs
Ensure that a build is approved by the change management team before the build is released: Pull requests
Explanation
To ensure that the code for App1 is only submitted for testing when a build has completed successfully, you should use Jobs in your GitHub workflow configuration. Jobs allow you to define a set of steps that run sequentially as part of your build process. You can configure a job to run your build steps, and then configure a separate job for testing that depends on the build job. This way, the testing job will only trigger if the build job completes successfully.
To ensure a build is approved by the change management team before being released, you should utilize Pull Requests in GitHub. Pull requests allow changes to be proposed, reviewed, and discussed before being merged into the main branch.
You can configure your GitHub repository settings to require pull requests for the main branch and disable direct pushes. You can also set up branch protection rules requiring certain status checks to pass and approvals from specific team members before the PR can be merged.
Then in your workflow, you can configure a job to only run when a pull request is closed (merged). This job can handle your release process.
This ensures the release only happens after the pull request has gone through review and approval by the change management team and been successfully merged.
In summary, using Jobs to orchestrate build and testing steps, and Pull Requests with branch protections for release approval, provides a robust solution for the given requirements on the AZ-400 exam.
Microsoft AZ-400 certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Microsoft AZ-400 exam and earn Microsoft AZ-400 certification.