AZ-400 Question 214
Select 2You have a classic build pipeline in Azure DevOps that compiles a .NET application, runs unit tests, and publishes artifacts. You want to migrate this pipeline to a YAML-based pipeline to ensure improved version control and better maintainability. Which two approaches should you consider to successfully migrate your classic pipeline to YAML?
- A
A. Use the 'View YAML' feature in the classic pipeline, then manually update any tasks or triggers that are not automatically converted.
- B
B. Convert any environment variables or variable groups to YAML syntax or define them in Azure Pipeline variable groups.
- C
C. Use the 'One-click migration wizard' in Azure DevOps to automatically produce an exact YAML replica of your classic pipeline with no manual modifications required.
- D
D. Copy the pipeline run logs from the classic pipeline and paste them into a .yml file to replicate all build steps.
- E
E. Create a separate Azure DevOps organization to host the new YAML pipeline in an isolated repository.
Show answer and explanation
Correct answers: A, B
Explanation
To migrate from a classic pipeline to YAML, you typically start by exporting or viewing partial YAML from classic tasks where supported. Then, you finalize the YAML by including all necessary tasks, triggers, and variables, either inline or via variable groups. Refer to official Microsoft documentation (https://learn.microsoft.com/azure/devops/pipelines/migrate-from-classic-pipelines) for detailed guidance on handling tasks that are not automatically converted and best practices for organizing variables.
- A. Correct.
A is correct. Using 'View YAML' can generate partial YAML for certain tasks, but you often need to manually configure triggers and tasks that don't fully export from the classic pipeline.
- B. Correct.
B is correct. Environment variables and variable groups defined in the classic pipeline should be migrated to YAML syntax or Azure Pipeline variable groups in order to preserve functionality.
- C. Incorrect.
C is incorrect. There is no fully automated 'One-click migration wizard' that converts the entire classic pipeline to YAML without further adjustments. Some tasks may not be translated correctly and require manual edits.
- D. Incorrect.
D is incorrect. Pipeline logs provide output messages rather than a structured build definition. Simply pasting logs into a .yml file does not recreate required pipeline tasks or steps.
- E. Incorrect.
E is incorrect. While you can store your YAML file in a new repository if desired, creating an entirely new Azure DevOps organization just for the pipeline is unnecessary and not a standard part of migration.