Skip to main content
Version: Next

Phase 01: CI/CD Setup

Runbook GitHub GitLab Azure DevOps

DOCUMENT CATEGORY: Phase Overview SCOPE: Source control project creation and CI/CD configuration PURPOSE: Establish deployment source control project with proper settings and environments

Status: Active Applies To: All Azure Local deployments Last Updated: 2026-03-19


Phase Purpose

Create the deployment source control project, configure project settings for secure deployments, create deployment environments, and configure environment-specific variables. This phase establishes the CI/CD foundation for infrastructure automation.


Prerequisites

Before starting this phase:

  • Azure CLI installed and authenticated to target tenant
  • Source control platform access with project/repo creation permissions
  • Deployment information (organization name, tenant ID, subscription IDs)
  • Access to Azure Local source control templates

Steps Overview

StepTitleDescription
1BootstrapCreate CI/CD service principal and configure Azure access
2Create Source Control ProjectCreate deployment repository with proper naming
3Configure Project SettingsSet branch protection, merge/PR approvals, security settings
4Create EnvironmentsCreate deployment environments for each target
5Configure Environment VariablesSet environment-specific variables for deployments
6Deploy RunnersDeploy self-hosted CI/CD runners to Azure

Key Deliverables

DeliverableDescription
Source Control ProjectDeployment project/repository created from Azure Local template
Project NamingFollows your organization's repository naming convention
Branch ProtectionMain branch protected with PR/merge request requirements
Code ReviewConfigured approval rules for code review
Security SettingsPush rules, security scanning enabled
EnvironmentsDeployment environments for each target (prod, dev, staging)
VariablesEnvironment-specific CI/CD variables configured
CI/CD RunnersSelf-hosted runners deployed and registered in target Azure subscription

Project Naming Convention

Use a consistent naming convention for deployment repositories. Example:

ComponentFormatExample
Organization Namelowercase, hyphensiic
Workloadinfrastructure typeazurelocal
Full Name<org>-azurelocaliic-azurelocal

Deployment Environments

Standard environments created for each deployment:

EnvironmentDescriptionUse Case
azr-prod-usProduction US regionPrimary production deployments
azr-dev-usDevelopment US regionDevelopment/testing
azr-prod-euProduction EU regionEuropean deployments (if applicable)
azr-stagingStaging environmentPre-production validation

Project Settings Checklist

Branch Protection

  • Main branch protected
  • Force push disabled
  • Deletion disabled
  • Pull/merge requests required

Code Review

  • Approvals required before merge
  • All discussions must be resolved
  • CI pipelines must succeed before merge

Security

  • Push rules / branch policies configured
  • Secret detection enabled
  • SAST scanning enabled
  • Dependency scanning enabled

Validation Checklist

  • Source control project created with correct naming
  • Project placed in correct organization/group
  • Branch protection rules applied
  • Code review approvals configured
  • Security settings enabled
  • Environments created
  • Environment variables configured
  • CI/CD runners deployed and registered
  • Runners appear online in source control platform
  • Test pipeline runs successfully

Next Steps

After completing Part 1, proceed to Part 2: Azure Foundation to establish the Azure cloud infrastructure including landing zones, networking, and security resources.


References