The easiest way is to clone existing pipeline through Azure DevOps portal. Click on Pipelines -> Your pipeline à Click the ellipse in the upper right corner (three vertical dots), then click clone.
If clone is not available due to any reason, you can create a new pipeline based on an existing yaml file which is basically cloning.
Pipelines -> New Pipeline -> Configure (3rd page of the wizard) -> Select “Existing Azure Pipelines YAML file”.
Here you can select the branch and the file you want to use. However, this does not copy the variables set in the pipelines.
Above solution will work within same project. If you want to clone/import pipeline from a different project, Select “Export to YAML” from source project pipeline. This will download a YAML file on your local. Open file, make changes and import to your new project repo.
Resources
Add to favorites