Reader small image

You're reading from  Implementing CI/CD Using Azure Pipelines

Product typeBook
Published inDec 2023
PublisherPackt
ISBN-139781804612491
Edition1st Edition
Concepts
Right arrow
Authors (2):
Piti Champeethong
Piti Champeethong
author image
Piti Champeethong

Piti Champeethong is a senior consulting engineer at MongoDB, Singapore. He has been a part of the software development community for over 20 years and specializes in database application development and CI/CD implementation. He is a Microsoft Certified Trainer, lecturer, and community leader. He lives in Thailand and engages with Thai tech communities, such as the MongoDB Thailand User Group and the Thailand .NET community by speaking at various events. He has made significant contributions to public repositories on .NET and MongoDB technologies, supporting the growth of the Thai tech community.
Read more about Piti Champeethong

Roberto Mardeni
Roberto Mardeni
author image
Roberto Mardeni

Roberto Mardeni has been working in the IT industry for over two decades. He specializes in software development, architecture, and DevSecOps practices around many different application platforms and CI/CD tools, typically focusing on Microsoft .NET and other open source programming languages. He has been working since 2017 as an application innovation specialist on the enterprise sales side at Microsoft, supporting their cloud business. He lives in the United States and helps some of the largest independent software vendors to adopt the Azure platform. This is his first foray into technical writing, but he has contributed to the open source community in different GitHub public repositories of his own and contributed to others as well.
Read more about Roberto Mardeni

View More author details
Right arrow

Preface

Continuous integration (CI) is the practice of using automated tools to compile automatically and continuously, based on changes made by developers to source code, and packaging and testing them to ensure they are stable and able to provide the expected functionality.

Continuous delivery (CD) uses the artifacts created via CI and deploys those applications without human intervention to end users, ensuring these are always updated with the latest versions and, in most cases, performing additional verifications in multiple environments before reaching the final end users.

All of this is possible by taking advantage of Azure Pipelines, one of the leading platforms to support all aspects of the software development life cycle (SDLC); however, in this book, we will focus on the CI/CD aspects and how to take advantage of the features available to effect the different task automation options under the DevOps umbrella, even touching on the DevSecOps aspects.

In this book, we provide you with the tools to get started, by learning the basic concepts and building from there to more complex scenarios. This will lead to end-to-end scenarios that enable your software development teams with the tools to automate, every step of the way, the delivery of applications, from source code to a running platform.

Who this book is for

From beginners to the most advanced users, anybody looking to better understand how to take advantage of Azure Pipelines can benefit from this book.

The three main personas who are the target audience of this content are as follows:

  • Software developers: They will learn how they can automatically build and deploy their software products, regardless of the target platform, at very early stages to speed up the SDLC
  • DevOps engineers: They will learn how Azure Pipelines can support any automation need, no matter the stage in the process, infusing quality and checks every step of the way
  • Security engineers: They will learn how they can integrate their tools in the CI/CD process to enforce security and quality at the beginning of the build and deployment process

What this book covers

Chapter 1, Understanding Azure Pipelines, provides an introduction to CI/CD, Azure DevOps, Azure Pipelines, and its components. It explains why an Azure pipeline is the right choice for certain cases, introduces other services under Azure DevOps such as Azure Repos, and guides you through setting up a new project, setting up a self-hosted agent, preparing a pipeline environment, and configuring agent pools and deployment groups.

Chapter 2, Creating Build Pipelines, teaches you how to create and manage pipelines, stages, jobs, tasks, triggers, and artifacts in Azure DevOps, as well as about running pipelines after code pushes to Azure Repos.

Chapter 3, Setting Variables, Environments, Approvals, and Checks, covers the creation of service connections, variable groups, secret files, and release pipelines in Azure DevOps. It also explains setting up service accounts for Azure Repos and GitHub connections. Additionally, you will learn about securely storing secret keys and using environments, with approvals and checks for stage progression control.

Chapter 4, Extending Advanced Azure Pipelines Using YAML, helps you to understand how to use YAML to create a build and release pipeline. It discusses in detail what the YAML syntax is to create stages, jobs, and tasks for web application deployment.

Chapter 5, Implementing the Build Pipeline Using Deployment Tasks, explores how to create and reuse a build task for the building process. This chapter covers the popular Node.js, NPM, .NET, Docker, and SQL Server deployment tasks using the YAML syntax.

Chapter 6, Integrating Testing, Security Tasks, and Other Tools, helps you understand how the extensibility of Azure Pipelines with other tools works. This chapter covers the popular tools SonarQube for code analysis and Jenkins for artifacts.

Chapter 7, Monitoring Azure Pipelines, teaches you how to monitor Azure Pipelines and related tasks, such as build tasks, deployment tasks, and pipeline agents. You will also learn how to build monitoring into pipelines to determine whether deployments improve or degrade the quality of a system.

Chapter 8, Provisioning Infrastructure Using Infrastructure as Code, examines how to create and reuse deployment tasks for the Infrastructure as Code (IaC) process. This chapter covers the popular IaC tools Terraform, Azure Bicep, and an ARM template using YAML syntax.

Chapter 9, Implementing CI/CD for Azure Services, shows you how to create the YAML and pipelines for Azure service deployment. You will learn how to set up and deploy applications on Azure App Service, Azure Kubernetes Service (AKS), Azure Container Apps, and Azure Container Instances (ACI).

Chapter 10, Implementing CI/CD for AWS, explores how to create YAML and pipelines to deploy containerized applications on different services such as AWS Lightsail, Elastic Kubernetes Service (EKS), and Elastic Container Service (ECS).

Chapter 11, Automating CI/CD for Cross-Mobile Applications by Using Flutter, dives into how to create a pipeline using YAML to automate the CI/CD of a mobile application build and release process. You will also learn how to implement YAML pipelines to deploy Flutter on Apple TestFlight and the Google Play Console, staging the environment of an end-to-end process.

Chapter 12, Navigating Common Pitfalls and Future Trends in Azure Pipelines, teaches you about common mistakes and suggests how to avoid them. This chapter also looks at potential future trends in Azure Pipelines.

To get the most out of this book

You will need to have a basic understanding of building and deploying applications with automation; however, this book will walk you through how this is done in Azure Pipelines. Each chapter has specific technical requirements.

Software/hardware covered in the book

Operating system requirements

Docker

Windows, Linux, or macOS

Visual Studio Code

Windows, Linux, or macOS

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: Add the following basic script – echo "Hello Second Task on Linux".

A block of code is set as follows:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "",
  "apiProfile": "",
  "parameters": {  },
  "variables": {  },
  "functions": [  ],
  "resources": [  ],
  "outputs": {  }
}

Any command-line input or output is written as follows:

$id=az ad sp list –display-name azure-pipelines –query "[].id" -o tsv

Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Start by clicking the Environments option under Pipelines in the main menu.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packtpub.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Implementing CI/CD Using Azure Pipelines, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

  1. Scan the QR code or visit the link below:
Download a free PDF copy of this book

https://packt.link/free-ebook/978-1-80461-249-1

  1. Submit your proof of purchase
  2. That’s it! We’ll send your free PDF and other benefits to your email directly
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Implementing CI/CD Using Azure Pipelines
Published in: Dec 2023Publisher: PacktISBN-13: 9781804612491
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Piti Champeethong

Piti Champeethong is a senior consulting engineer at MongoDB, Singapore. He has been a part of the software development community for over 20 years and specializes in database application development and CI/CD implementation. He is a Microsoft Certified Trainer, lecturer, and community leader. He lives in Thailand and engages with Thai tech communities, such as the MongoDB Thailand User Group and the Thailand .NET community by speaking at various events. He has made significant contributions to public repositories on .NET and MongoDB technologies, supporting the growth of the Thai tech community.
Read more about Piti Champeethong

author image
Roberto Mardeni

Roberto Mardeni has been working in the IT industry for over two decades. He specializes in software development, architecture, and DevSecOps practices around many different application platforms and CI/CD tools, typically focusing on Microsoft .NET and other open source programming languages. He has been working since 2017 as an application innovation specialist on the enterprise sales side at Microsoft, supporting their cloud business. He lives in the United States and helps some of the largest independent software vendors to adopt the Azure platform. This is his first foray into technical writing, but he has contributed to the open source community in different GitHub public repositories of his own and contributed to others as well.
Read more about Roberto Mardeni