In this post, I’ll walk you through the process of exporting and importing a CI pipeline from one Azure DevOps project to another.
- An Azure DevOps account – If you don’t already have a DevOps account, you may create one by following the instructions in this article.
- A build pipeline – You can create an Azure DevOps build pipeline by following this article.
|Important : The YAML cannot be imported in order to create a new pipeline. It is necessary to export and import a JSON file.|
Export a build pipeline
The below steps show how to export a build pipeline in a json file.
Step 1. Sign-in to Azure DevOps portal.
Step 2. Choose the organization and project from which wish to export the JSON file for the build process.
Step 3. On the left-hand side menu navigate to Pipelines,
on the top right corner select
and then Export to JSON
The browser will download and save the file to the downloads directory.
|Browser||Downloads default path|
Import the build Pipeline
The below steps show how to import the build Pipeline, exprorted in the previously.
Step 1. Sign in to Azure DevOps portal.
Step 2. Choose the organization and project which want to import the JSON file to create the build pipeline.
Step 3. Navigate to the Pipelines menu, click the and select Import a pipeline
choose the previously exported JSON file and click Import.
Finally, configure necessary settings, and then the build pipeline is ready to use.