Study guide
6.2 GitHub-Azure Pipelines Integration & Hybrid Migration
Microsoft Certified: Azure DevOps Engineer Expert AZ-400
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Flow of Work, Traceability & Work Tracking
1.1 Flow of Work, GitHub Flow & Feedback Cycles 1.2 Work Tracking with Azure Boards & GitHub Projects 1.3 End-to-End DevOps Traceability & Quality Tracking
2 Chapter 2: DevOps Metrics, Dashboards & Team Collaboration
2.1 DORA Metrics, Flow Metrics & Dashboard Design 2.2 Lifecycle Metrics Across the Six DevOps Phases 2.3 Work Item Queries, WIQL Charts & Analytics 2.4 Project Documentation: Wikis, Mermaid Diagrams & Release Notes 2.5 Webhooks, Service Hooks & Microsoft Teams ChatOps
3 Chapter 3: Git Branching Strategies & Pull Request Workflows
3.1 Git Branching Models & Strategy Design 3.2 Pull Request Workflows & Merge Strategies 3.3 Branch Policies, Quality Gates & Compliance Restrictions
4 Chapter 4: Repository Management, Optimization & Git Data Operations
4.1 Git LFS Architecture & .gitattributes Tracking 4.2 LFS History Migration, git-fat & File Locking 4.3 Git Repository Scaling, Scalar & Monorepo Governance 4.4 Repository Permissions & Git Tag Governance 4.5 Git Data Recovery & Sensitive-Data Scrubbing
5 Chapter 5: Package Management & Dependency Versioning
5.1 Selecting Package Tools: Azure Artifacts vs. GitHub Packages 5.2 Feed Scoping, Upstream Sources & Pipeline Authentication 5.3 Package Views, Immutability & Quality Promotion 5.4 Dependency Versioning: SemVer, CalVer & Automated Versioning 5.5 Pipeline Artifact Versioning & Artifact Storage Strategy
6 Chapter 6: Pipeline Infrastructure, Agents & Integration
6.1 Selecting a CI/CD Solution: Azure Pipelines vs. GitHub Actions 6.2 GitHub-Azure Pipelines Integration & Hybrid Migration 6.3 Hosted vs. Self-Hosted Agents & Runners 6.4 VMSS Elastic Pools, Container Jobs & Agent Governance 6.5 Pipeline Triggers, Filters & Concurrency Management
7 Chapter 7: YAML Pipeline Architecture & Reusable Elements
7.1 YAML Pipeline Anatomy: Stages, Jobs, Steps & Workspaces 7.2 Job Execution Order: DAG Dependencies, Parallelism & Conditions 7.3 Reusable Elements: Templates, Parameters & Variables 7.4 Variable Groups, Secret Variables & Key Vault Linking 7.5 YAML Environments, Checks & Deployment Approvals
8 Chapter 8: Testing Strategy, Quality Gates & Code Coverage
8.1 Test Strategy Design: Local, Unit & Integration Testing 8.2 Load, Stress & Performance Testing in Pipelines 8.3 Test Execution Tasks, Agents & Results Integration 8.4 Code Coverage Analysis & SonarQube Integration 8.5 Quality Gates, Release Gates & Governance Checks
9 Chapter 9: Modern Deployment Strategies & Zero-Downtime Delivery
9.1 Progressive Delivery: Blue-Green, Canary & Ring Deployments 9.2 Minimizing Downtime: Deployment Slots & Rolling Updates 9.3 Feature Flags with Azure App Configuration & Feature Manager 9.4 Designing the High-Priority Hotfix Path 9.5 Ordered Dependency Deployments, Resiliency & Rollback
10 Chapter 10: Artifact Deployment & Database DevOps
10.1 Containerized Application Delivery: ACR, AKS & Container Apps 10.2 Binary, Web App, Function & Scripted Deployments 10.3 Database DevOps: State-Based & Migration-Based Strategies
11 Chapter 11: Infrastructure as Code (IaC) & Azure Deployment Environments
11.1 Infrastructure as Code Strategy: Bicep, ARM & Terraform 11.2 Desired State Configuration & Azure Machine Configuration 11.3 Azure Deployment Environments (ADE) & Developer Self-Service
12 Chapter 12: Pipeline Maintenance, Health & Modernization
12.1 Pipeline Health, Flaky Tests & Reliability Engineering 12.2 Pipeline Optimization: Caching, Slicing & Concurrency 12.3 Artifact & Build Retention Governance 12.4 Modernizing CI/CD: Classic to YAML Migration
13 Chapter 13: Authentication, Authorization & Identity Governance
13.1 Microsoft Entra Service Principals & Managed Identities 13.2 Service Connections, Workload Identity & Personal Access Tokens 13.3 Azure DevOps Projects, Teams & Permission Evaluation 13.4 Access Levels, GitHub Roles & Outside Collaborators
14 Chapter 14: Secrets Management, Sensitive Data & DevSecOps Scanning
14.1 Azure Key Vault, Secret Variables & Secretless CI/CD 14.2 Security Scanning Strategy, GHAS & Secret Scanning 14.3 CodeQL SAST in Pipelines and Containers 14.4 Software Supply Chain, Container Scanning & Cloud Defender
15 Chapter 15: Telemetry Collection, Azure Monitor & Alerting
15.1 Azure Monitor Architecture, AMA & Data Collection Rules 15.2 Application Insights & Specialized Azure Monitor Insights 15.3 Alerting Rules, Action Groups & GitHub Repository Insights
16 Chapter 16: Telemetry Analysis, Distributed Tracing & SRE Practices
16.1 Distributed Tracing, Application Map & Exception Triage 16.2 KQL Log Analytics, SRE Observability & Error Budgets
6.2 GitHub-Azure Pipelines Integration & Hybrid Migration
Key Takeaways Explain This Topic AI
The Azure Pipelines GitHub App is the recommended connection because it is organisation-owned, scoped to selected repositories and produces rich re-runnable status checks.
OAuth and personal access token connections bind to a single human identity and stop working when that account is disabled.
A pipeline can build a GitHub repository declared under resources.repositories with an explicit checkout step, enabling one definition to assemble source from several repositories.
For GitHub-hosted branches the merge gate is a GitHub branch protection rule or ruleset marking the pipeline check required - Azure DevOps branch policies do not apply.
Migrating to GitHub Actions maps variable groups to repository or environment secrets, task groups to composite actions or reusable workflows, and Key Vault linkage to the azure/get-keyvault-secrets pattern under OIDC.
Last updated: September 2026
6.2 GitHub-Azure Pipelines Integration & Hybrid Migration
Many organizations do not choose one product outright. They keep source in GitHub and orchestrate in Azure Pipelines, or run both side by side during a migration. The connection type chosen for that link determines whether the integration survives an employee offboarding.
1. Hybrid CI/CD Architectures
Enterprise organizations frequently operate in a hybrid model where source code lives in GitHub Enterprise while continuous delivery to Azure environments is orchestrated by Azure Pipelines, or vice versa.
Triggering Azure Pipelines from GitHub Repositories
To build and deploy GitHub repositories using Azure Pipelines, engineers configure a GitHub Service Connection in Azure DevOps:
GitHub App Connection (Recommended) : Installs the Azure Pipelines app on the GitHub organization. Authenticates via OAuth without storing personal access tokens (PATs).
Personal Access Token (PAT) / OAuth : Direct integration where Azure DevOps registers webhooks in the GitHub repository.
Webhook Mechanics : When an engineer pushes commits or opens pull requests in GitHub, GitHub dispatches an HTTPS webhook payload to Azure DevOps ( https://dev.azure.com/{org}/_apis/public/hooks/externalEvents ). Azure Pipelines evaluates branch and path triggers and schedules the pipeline on an agent pool. # Azure Pipelines YAML triggered from an external GitHub repository
resources:
repositories:
- repository: ExternalGitHubRepo
- type: github
- name: ContosoCorp/PaymentEngine
- endpoint: ContosoGitHubServiceConnection
trigger:
branches:
include:
- main
- releases/*
- Deploying to Azure from GitHub Actions via OpenID Connect (OIDC)
Storing long-lived Azure Service Principal passwords or client secrets inside GitHub Secrets creates a substantial security risk. The industry standard and AZ-400 recommended pattern is Workload Identity Federation via OpenID Connect (OIDC) . [GitHub Actions Runner] ──────1. Request OIDC Token──────► [GitHub OIDC Token Service]
- │ │
- │ 2. Issues JWT
- │ │
- ▼ ▼
- [azure/login Action] ────────3. Exchange JWT for Token────► [Microsoft Entra ID]
- │ │
- │ 4. Validates Subject Ref
- ▼ ▼
- [Azure CLI / ARM Deploy] ────5. Authorize with Short-Lived Access Token──► [Azure Subscription]
Configuration Workflow:
Microsoft Entra ID App Registration : Register an application representing the GitHub workflow.
Federated Identity Credential : Create a federated credential linking the application to the GitHub repository subject identifier:
- Issuer : https://token.actions.githubusercontent.com
- Subject Identifier : repo:<org>/<repo>:ref:refs/heads/main (or environment:<env-name> )
- Audience : api://AzureADTokenExchange
Role Assignment : Assign Azure RBAC roles (e.g., Contributor) to the App Registration on the target resource group or subscription.
GitHub Actions Workflow : Authenticate seamlessly without secrets: name: Deploy to Azure via OIDC
on:
push:
branches: [ main ]
permissions:
- id-token: write # Mandatory for requesting the OIDC JWT token
- contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Azure Login via OIDC
- uses: azure/login@v2
with:
- client-id: ${{ secrets.AZURE_CLIENT_ID }}
- tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Deploy ARM Template
- uses: azure/arm-deploy@v1
with:
- resourceGroupName: 'rg-production-eastus'
- template: './infra/main.bicep'
- 2. Migration Strategies: Azure Pipelines to GitHub Actions
Migrating legacy pipelines requires a systematic translation of tasks, variables, and governance constructs.
Translating Common Tasks to Actions
- Azure Pipelines Task GitHub Actions Equivalent Action / Step
- checkout: self uses: actions/checkout@v4
task: DotNetCoreCLI@2 uses: actions/setup-dotnet@v4 followed by run: dotnet ...
- task: NodeTool@0 uses: actions/setup-node@v4
- task: JavaToolInstaller@0 uses: actions/setup-java@v4
- task: Docker@2 uses: docker/build-push-action@v5
- task: AzureCLI@2 uses: azure/CLI@v2 (following azure/login@v2 )
- task: AzureResourceManagerTemplateDeployment@3 uses: azure/arm-deploy@v1
- task: PublishTestResults@2 uses: EnricoMi/publish-unit-test-result-action@v2
- task: PublishBuildArtifacts@1 uses: actions/upload-artifact@v4
- task: DownloadBuildArtifacts@0 uses: actions/download-artifact@v4
- Variable and Secret Mapping
Azure DevOps Variable Groups (linked to Azure Key Vault) map to GitHub Actions Environment Secrets or dynamic retrieval at runtime using the azure/get-keyvault-secrets@v1 action.
Pipeline Parameters ( parameters: ) in Azure Pipelines map to workflow_dispatch inputs in GitHub Actions.
Stage Dependencies ( dependsOn ) map to Job Dependencies ( needs: ).
Pipeline Templates ( template: steps.yml ) map to Composite Actions (for modular steps) or Reusable Workflows ( workflow_call for entire jobs).
3. Connecting GitHub Repositories to Azure Pipelines
Azure Pipelines can build a GitHub repository through three different connection types, and the exam expects you to know which one survives an employee departure:
Connection type Credential stored Status checks on PRs Best for
Azure Pipelines GitHub App App installation (organization-owned) Rich checks with re-run buttons The recommended default for organizations
OAuth The connecting user's GitHub OAuth grant Commit statuses only Quick personal setup, demos
Personal access token A PAT in a service connection Commit statuses only Servers or orgs that block GitHub Apps
The GitHub App is organization-scoped and can be restricted to selected repositories, so the pipeline keeps building after the person who created the connection leaves. OAuth and PAT connections are bound to one human identity and are the standard cause of "the pipeline stopped triggering after an offboarding" scenarios.
Two more integration mechanics show up repeatedly:
Multi-repository checkout. A pipeline stored in Azure Repos can build source from GitHub by declaring the repository as a resource and checking it out explicitly: resources:
repositories:
- repository: appSource
- type: github
- name: contoso/payments-api
- endpoint: contoso-github-app # service connection name
- ref: refs/heads/main
steps:
- checkout: self
- checkout: appSource
Branch protection integration. For GitHub repositories the gate is the GitHub branch protection rule / ruleset that marks the Azure Pipelines check as required. There is no Azure DevOps branch policy for a GitHub branch, which is the mirror image of the Azure Repos rule where YAML pr: triggers are ignored in favour of branch policies.
- 4. Realistic Exam Scenario & Common Traps
- Scenario: Enterprise Financial Portal Modernization
Organization : Woodgrove Bank maintains 40 core banking services. Developers write code in GitHub Enterprise Cloud. However, internal banking compliance mandates that no deployment to production can proceed without:
A validated ServiceNow change request ticket.
Sign-off from the Head of InfoSec.
Automatic rollback if error rates exceed 0.5% in Azure Monitor within 15 minutes of release.
Complete audit traceability linked to formal security test plans in Azure Test Plans.
DevOps Solution :
Retain Azure Pipelines as the enterprise release orchestration engine.
Configure a GitHub Service Connection using the Azure Pipelines GitHub App so pushes in GitHub Enterprise trigger Azure Pipelines builds.
Implement an Azure Pipelines YAML multi-stage pipeline where the DeployProd stage targets an Azure DevOps Environment named Production-CoreBanking .
Configure Environment Checks: an Invoke REST API check to validate the ServiceNow ticket, a Manual Approval assigned to InfoSec, and an Azure Monitor Alerts gate evaluating live application telemetry.
Maintain code in GitHub for optimal developer experience while preserving enterprise compliance and governance in Azure DevOps.
Common Exam Traps to Avoid
Trap: Believing GitHub Actions requires storing long-lived service principal passwords. Storing client secrets in GitHub Secrets is vulnerable to expiration and leakage. Microsoft strongly recommends OIDC Workload Identity Federation ( azure/login@v2 with id-token: write ).
Trap: Assuming GitHub Actions natively supports TFVC or Subversion. GitHub Actions only runs against Git repositories. If an exam scenario mentions TFVC, Azure Pipelines is the mandatory answer.
Trap: Conflating Classic Release Gates with YAML Environment Checks. Classic release pipelines use pre/post-deployment gates on release stages. YAML multi-stage pipelines enforce gates exclusively via Checks & Approvals configured on Environments in Project Settings.