Azure Pipeline CI

Mugdha Mundhe
3 min readJul 17, 2023

--

Azure is a one of the option for creating CI CD pipeline for releasing fast and secure builds.

If you check in your Azure devops account you can see under your project. Repos, Pipelines and Artifacts. This three section are important here.

Repos:

First you need to host the project in any git repository. It is not only repository but also it is the one of the part of pipeline. You can choose any git workflow as per comfort. Azure devops support all kind of git workflow. Once our repository established and team ready to create features or ready to create pull request our next step came into picture which is Azure Pipeline.

Azure Pipeline:

(Image is only for reference purpose)

For running your pipeline you need to use YAML file. YAML (.yml) file include steps for running your pipeline. You need to host this files with rest of your app code in your git project.

When you click on create pipeline you will get entrypoint YAML file e.g. azure-pipelines.yml.

Image 1 (Only for reference purpose)

YMAL file having code in steps. Each steps executes the certain command. steps will run with scrip attributes.

step

step is main and smallest building block of pipeline. step can either be a script or Task.

task

You can use task with set of inputs. Azure has lots of pre loaded tasks already into Azure Library. You can select and configure using UI. Once you complete with your details and save. It will automatically convert and edit as YAML code. e.g. You can add direct Docker Task.

Above YAML image (Image 1) having small pipeline so all steps included into single YAML but in reality, we need to deal with complex scenarios and need multiple YAMLs. In this scenario we need jobs. job is simply group of multiple steps. If we have single job we avoid to write syntax in YAML but when we have two or more job we can write under jobs.

Image 2 (Only for reference purpose)

Each job runs on an agent. All the steps in job run on single agent.An agent is computing infrastructure with agent software installed on it.

pool is on which OS and defined Version used to run your task. You can run steps in parallel with jobs.

Main task of build pipeline to check test code changes and produce an artifacts for deployment.

Azure Artifacts:

Artifacts depends upon programming language used for writing the application. e.g. Java having jar or .net having nugut. In Azure artifacts you can store and share different packages for public and private source which are produced by the CI pipeline. Azure artifacts currently supports three types of artifacts: Maven packages, nugut packages and npn packages.

In Modern software development we usually don't produce such artifacts anymore. Instead of that, we create docker images as artifacts. No matter which language we use we create docker images. Docker images are stored in special Container Registry. Instead of Azure Artifacts, you need to use some container registry.

In Azure pipeline CI we need to check three main steps Repos, pipeline and artifacts. After the artifacts creation the next step is deployment or we can call CD part. We will discuss CD in upcoming blogs.

--

--

Mugdha Mundhe
Mugdha Mundhe

Written by Mugdha Mundhe

Expertise in mobile application development like iOS & React Native. Introductory knowledge of Azure DevOps. Also playing role of Scrum Master in team.