A2oz

How Do I Create a Duplicate Pipeline in Azure DevOps?

Published in Azure DevOps 2 mins read

You can create a duplicate pipeline in Azure DevOps by copying the YAML definition of the existing pipeline and modifying it to suit your needs. Here's a step-by-step guide:

1. Navigate to the Pipeline

  • Go to your Azure DevOps project and select Pipelines.
  • Locate the pipeline you want to duplicate.

2. Copy the YAML Definition

  • Click on the three dots next to the pipeline name.
  • Select Edit.
  • Copy the entire YAML content of the pipeline.

3. Create a New Pipeline

  • Click on New pipeline.
  • Choose the option to Create a new pipeline.
  • Select YAML.
  • Paste the copied YAML definition into the editor.

4. Modify the Pipeline

  • Rename the pipeline: Update the name field in the YAML definition.
  • Adjust pipeline settings: Modify any variables, triggers, stages, or jobs as needed.
  • Save the pipeline: Click on Save to create the duplicate pipeline.

5. Validate and Run

  • Validate the pipeline: Ensure the YAML definition is valid and free of errors.
  • Run the pipeline: Execute the new pipeline to test its functionality.

Example

Here's an example of how to modify a pipeline's name:

name: 'MyOriginalPipeline' # Original pipeline name

# ... other pipeline definition ...

---

name: 'MyDuplicatePipeline' # Duplicate pipeline name

# ... other pipeline definition ...

Conclusion

By following these steps, you can easily create a duplicate pipeline in Azure DevOps and customize it to meet your specific requirements.

Related Articles