CI/CD and Azure Devops — How to create a basic Pipeline

Artur Santos
Poatek
Published in
4 min readSep 6, 2023

Creating a pipeline in Azure DevOps involves several steps. A pipeline typically defines the build, test and deployment processes for your software project. Here’s a step-by-step guide on how to create a basic pipeline:

Prerequisites:

1. Azure DevOps Account:

You need an Azure DevOps account. If you don’t have one, you can sign up for a free account on the Azure DevOps website (https://signup.azure.com/).

Step 1: Sign in to Azure DevOps

- Open your web browser and navigate to the Azure DevOps portal (https://dev.azure.com/).

- Sign in with your Azure DevOps account credentials.

Step 2: Create a New Project

- If you don’t have a project yet, you can create one by clicking on the “New Project” button and following the prompts. If you already have a project, you can skip this step.

Step 3: Navigate to Your Project

- After creating or selecting a project, navigate to it.

Step 4: Create a New Pipeline

- Click on the “Pipelines” option in the left-hand navigation menu.

- Click on the “New Pipeline” button to start creating a new pipeline.

Step 5: Choose a Repository

- Azure DevOps will ask you to choose the source code repository where your project is stored. Select the appropriate repository (Azure Repos, GitHub, Bitbucket, etc.) and follow the authorization prompts if required.

Step 6: Select a Template or Start with an Empty Pipeline

- Azure DevOps provides several predefined pipeline templates for various programming languages and platforms. You can choose one of these templates or start with an empty pipeline if you want to configure it manually.

Step 7: Configure Your Pipeline

- If you choose a template (here we have .NET Desktop as an example), Azure DevOps will provide a basic configuration for your pipeline based on your project type. You can customize this configuration by editing the YAML file or using the visual designer.

- If you started with an empty pipeline, you’ll need to define your pipeline’s steps manually in a YAML file or through the visual designer. This involves specifying the build and deployment tasks, dependencies, triggers, and more.

Step 8: Save Your Pipeline

- After configuring your pipeline, save your changes.

Step 9: Commit and Push Your Pipeline Configuration

- If you’re using a source control repository (e.g., Git), commit and push your pipeline configuration file (usually named `.yaml` or `.yml`) to the repository. This is required for Azure DevOps to automatically detect and run your pipeline when changes are made.

Step 10: Run Your Pipeline

- You can manually trigger your pipeline by clicking the “Run” button in the pipeline view.

- Alternatively, configure triggers to automatically run your pipeline on code commits, pull requests, or other events.

Step 11: Monitor and Troubleshoot

- Once your pipeline is running, monitor its progress, and review the build and deployment logs for any issues. Clicking on “Job” will open the detailed logs.

- Then there we go. Azure DevOps provides detailed logs and reports to help you troubleshoot problems.

Congratulations! You’ve created a basic pipeline in Azure DevOps. You can further enhance and customize your pipeline to meet your specific project requirements by adding more build steps, tests, deployment stages, and integrations with other Azure services and third-party tools.

References

  1. Azure DevOps Documentation: https://azure.microsoft.com/pt-br/products/devops
  2. Course “Azure Pipelines — CI/CD, Docker e Kubernetes no Azure DevOps”: https://www.udemy.com/course/azurepipelines/

--

--