Muokkaa

Jaa


Clone or import a pipeline

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

One approach to creating a pipeline is to copy an existing pipeline and use it as a starting point. For YAML pipelines, the process is as easy as copying the YAML from one pipeline to another. For pipelines created in the classic editor, the procedure depends on whether the pipeline to copy is in the same project as the new pipeline. If the pipeline to copy is in the same project, you can clone it, and if it is in a different project you can export it from that project and import it into your project.

For information in migrating a classic build pipeline to YAML using Export to YAML, see Migrate from classic pipelines.

Clone a pipeline

For YAML pipelines, the process for cloning is to copy the YAML from the source pipeline and use it as the basis for the new pipeline.

  1. Navigate to your pipeline, and choose Edit.

    Pipeline details in Azure DevOps Server 2019

  2. Copy the pipeline YAML from the editor, and paste it into the YAML editor for your new pipeline.

  3. To customize your newly cloned pipeline, see Customize your pipeline.

  1. Go to the pipeline details for your pipeline, and choose Edit.

    Edit pipeline.

  2. Copy the pipeline YAML from the editor, and paste it into the YAML editor for your new pipeline.

  3. To customize your newly cloned pipeline, see Customize your pipeline.

Export and Import a pipeline

You can create a new classic pipeline by exporting an existing one and then importing it. This is useful in cases where the new pipeline has to be created in a separate project.

In a YAML pipeline, exporting from one project and importing into another is the same process as cloning. You can simply copy the pipeline YAML from the editor and paste it into the YAML editor for your new pipeline.

  1. Navigate to your pipeline, and choose Edit.

    Pipeline details in Azure DevOps Server 2019

  2. Copy the pipeline YAML from the editor, and paste it into the YAML editor for your new pipeline.

  3. To customize your newly cloned pipeline, see Customize your pipeline.

  1. Go to the pipeline details for your pipeline, and choose Edit.

    Edit pipeline.

  2. Copy the pipeline YAML from the editor, and paste it into the YAML editor for your new pipeline.

  3. To customize your newly cloned pipeline, see Customize your pipeline.

Next steps

Learn to customize the pipeline you just cloned or imported.