Forum Discussion
Migrating Builds from TFS 2017 to DevOps Server 2022, a few questions...
Hi all,
We are going to be moving to DevOps Server 2022 and our on-prem build definitions will have to be converted to the infrastructure as code, YAML format.
The question(s) I have relate to getting started. Currently, with TFS, I just choose New Definition, add/configure the steps or tasks and away the build goes. With the new format, it is my understanding that the build definition is now a YAML script file that will be kept in source control. How do I get started creating this file and where do I store it in source control, or is that all automatically done with a New Definition option?
Once I figure that out, I'll be recreating our Definitions with the Classic option for task configuration until I'm up to speed with YAML to script on the fly.
Any information or help is appreciated!
Thanks!!
1 Reply
Take a look at the below for starting with YAML Pipelines in DevOps Server 2022:
- Where to Create and Store YAML Files
- YAML pipeline files are typically named azure-pipelines.yml (or similar) and stored in the root of your source repository.
- You can create them manually or use the New Pipeline wizard in DevOps Server 2022, which helps scaffold a basic YAML file.
- Once created, the file is committed to source control—this is what makes it versioned and portable.
- Creating a New YAML Pipeline
- Go to Pipelines → New Pipeline
- Choose your repository (Git or TFVC)
- Select YAML as the pipeline type
- You can either:
- Use an existing YAML file from the repo
- Start from scratch with a blank editor
- Use a template to generate a starter pipeline
- YAML Syntax Basics
trigger: - main pool: vmImage: 'ubuntu-latest' steps: - task: UseDotNet@2 inputs: packageType: 'sdk' version: '6.0.x' - script: dotnet build displayName: 'Build Project'
- Classic to YAML Transition Strategy
- Recreate your existing Classic pipelines using the same tasks in YAML format.
- Use the Export to YAML option (if available) in Classic pipelines to get a head start.
- Gradually migrate builds while keeping Classic definitions as fallback until you're confident.