Introduction

In our previous tutorial, we built a simple Ballerina microservice that returns a JSON array of Todo list items. There, we did everything manually from building the project, generating a Docker image, and pushing it to Azure Container Registry and deploying it into Azure Kubernetes Service.

Although that provided you with a simple starter project, you need a production-grade continuous integration (CI) and continuous deployment (CD) pipelines to make the shipping of developer changes to produce more reliable, repeatable, and frequent.

In the scope of this tutorial, we are going to build a continuous integration pipeline with Azure Pipelines to automate the build and verification process for the TodoService we’ve implemented in the previous tutorial. During the tutorial, you will:

  1. Create a project and a pipeline in Azure Pipelines.
  2. Connect a GitHub repo to the pipeline
  3. Create a private container registry in Azure Container Registry (ACR) to store the TodoService Docker image
  4. Create an Azure AD service principal to authenticate the pipeline against ACR
  5. Create a Docker registry service connection to connect the pipeline to ACR
  6. Code the pipeline to build the TodoService project, generate a Docker image and push it to ACR

If you have missed the first part of the series, you can find it here.

Prerequisites

  • A GitHub account, where you can create a repository. If you don’t have one, you can create one for free.
  • An Azure DevOps organization. If you don’t have one, you can create one for free.
  • An Azure account. If you don’t have one, you can create one for free.
  • Installation of Docker and Azure CLI in your local workstation.

#continuous integration #microservice #ballerina #azure devops #devops

 Continuous Integration With Azure DevOps
1.25 GEEK