Automating Builds in Azure DevOps for Continuous Integration

Ensuring Automatic Build Trigger in Azure DevOps

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

Your company has a project in Azure DevOps for a new web application.

You need to ensure that when code is checked in, a build runs automatically.

Solution: From the Triggers tab of the build pipeline, you select Batch changes while a build is in progress.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B

Instead, In Visual Designer you enable continuous integration (CI) by:

1. Select the Triggers tab.

2. Enable Continuous integration.

Note: Batch changes -

Select this check box if you have many team members uploading changes often and you want to reduce the number of builds you are running. If you select this option, when a build is running, the system waits until the build is completed and then queues another build of all changes that have not yet been built.

https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-designer

The solution presented in the question is not correct.

The goal is to ensure that when code is checked in, a build runs automatically. The solution presented in the question involves selecting the Batch changes while a build is in progress trigger from the Triggers tab of the build pipeline. This trigger is designed to run the build multiple times while changes are being made to the code, rather than triggering the build automatically when code is checked in.

To automatically trigger the build when code is checked in, the Continuous Integration (CI) trigger should be enabled on the build pipeline. The CI trigger monitors the source code repository for changes and automatically triggers a build when changes are detected.

To enable the CI trigger, follow these steps:

  1. Open the build pipeline in Azure DevOps.
  2. Click on the Edit button to open the pipeline in edit mode.
  3. Click on the Triggers tab.
  4. Click on the Enable continuous integration checkbox.
  5. Select the appropriate branch to monitor for changes.
  6. Save the pipeline.

By enabling the CI trigger on the build pipeline, the build will run automatically when code is checked in, which meets the stated goal. Therefore, the correct answer to the question is B. No.