Exercises
- Add a folder named
pipelines
under the root directory of thePacktBookLibrary
repository. - Create a subfolder named
build
under thepipelines
directory. - Add a build file named
main-ci-build.yml
. - Insert the following code block in the file:
trigger: - main pool: vmImage: ubuntu-latest variables: buildConfiguration: 'Release' steps: - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)'
- Save the file and commit your changes to the branch. Push and then raise a pull request to merge your changes with the main branch.
- Create a new pipeline in your team project. In the Configure your pipeline step, select the Existing Azure Pipelines YAML file option:
Figure 5.22 – Using an existing pipeline option
- When prompted to select the build pipeline, specify the
main-ci-build.yml
file. Click Continue to finish creating your build...