Actions before creating a CI CD pipeline in Azure DevOps - kondareddypp/azure-network-fundamentals GitHub Wiki

Here’s a structured GitHub Wiki format to list the necessary actions before creating a CI/CD pipeline in Azure DevOps:


Pre-requisites for Setting Up a CI/CD Pipeline

Introduction

Before you dive into creating a Continuous Integration and Continuous Delivery (CI/CD) pipeline, ensure the following steps are completed. These pre-requisites will ensure a seamless setup and deployment process.


1. Project and Repository Setup

  • Description: A structured project and repository are essential for managing source code and collaboration.
  • Actions:
    1. Create an Azure DevOps project or use an existing one.
    2. Set up a Git repository under Azure Repos or connect an external repository (e.g., GitHub).
    3. Organize your codebase with a proper branching strategy (e.g., feature branches, develop, master).

2. Azure DevOps Account and Permissions

  • Description: Ensure proper access control to avoid disruptions during pipeline setup.
  • Actions:
    1. Create or log in to your Azure DevOps account.
    2. Verify your user role and permissions in the project.
    3. Add team members and assign necessary roles.

3. Build and Test Scripts

  • Description: Prepare scripts for automated build and testing processes.
  • Actions:
    1. Define build scripts (e.g., build.yaml, build.ps1).
    2. Write test scripts for unit and integration tests.
    3. Ensure all dependencies and configurations are included in the scripts.

4. Infrastructure Setup

  • Description: Prepare the infrastructure required for deployment.
  • Actions:
    1. Create and configure the target environment (e.g., Azure App Service, Kubernetes).
    2. Ensure network configurations and firewalls are correctly set.
    3. Set up necessary resources like databases or storage accounts.

5. Environment Variables and Secrets

  • Description: Securely manage sensitive information for deployment.
  • Actions:
    1. Identify all environment-specific variables and secrets (e.g., API keys, connection strings).
    2. Store secrets securely in Azure DevOps Pipeline Library or Key Vault.
    3. Reference variables in your build and release pipelines.

6. Dependency Management

  • Description: Ensure all dependencies for building and deploying the application are pre-installed.
  • Actions:
    1. Identify external tools, libraries, or packages your application requires.
    2. Use Azure Artifacts or package managers like npm, NuGet, or Maven for dependency management.
    3. Verify that dependencies are included in the build process.

7. Pipeline Design

  • Description: Plan the structure and workflow of your CI/CD pipeline.
  • Actions:
    1. Define stages like Build, Test, and Deploy.
    2. Identify triggers for pipeline execution (e.g., code push, pull request).
    3. Use YAML templates for pipeline configuration.

8. Testing Frameworks

  • Description: Set up appropriate testing tools and frameworks.
  • Actions:
    1. Choose a testing framework compatible with your application (e.g., NUnit, Selenium).
    2. Ensure test cases cover all critical functionalities.
    3. Configure automated testing in the pipeline.

Resources