Inhaltsverzeichnis
Azure DevOpsPipelines & CI/CD
Azure DevOps for CI/CD pipelines, repos, boards and artifacts - best practices for agile software development and deployment automation.
Azure DevOps Fundamentals
Azure DevOps Services (formerly VSTS) is a suite of Microsoft tools for the entire software development lifecycle. It supports agile planning, source code management, build and release automation, and test management.
Integriert
End-to-End DevOps Toolchain
Cloud & On-Prem
Azure DevOps Services & Server
Flexible
Anpassbar an jeden Workflow
Azure Repos (Git)
Branching strategy example
# Git Branching Modell (z.B. GitFlow Variante)
# Main/Master Branch (Manufacturing)
# Stable, represents the production code.
# Only merges from release branches or hotfixes.
git checkout main
git merge --no-ff release/v1.2.0
git tag -a v1.2.0 -m "Release Version 1.2.0"
# Develop branch (integration)
# Main development branch, integrates all features.
git checkout develop
git merge --no-ff feature/neues-dashboard
# Feature branches (for new features)
# Branched off develop, one branch per feature.
git checkout develop
git checkout -b feature/user-authentication
# ... development ...
git add .
git commit -m "Feature: user authentication implemented"
git push origin feature/user-authentication
# Create pull request to develop
# Release branches (preparation for releases)
# Branched off develop, for stabilization and bug fixes before release.
git checkout develop
git checkout -b release/v1.2.0
# ... bug fixes, tests, docs ...
# Merge to main and develop after approval
# Hotfix branches (for critical production defects)
# Branched off main, for quick fixes.
git checkout main
git checkout -b hotfix/kritischer-login-bug
# ... bug fix ...
# Merge to main and develop after approvalKernfunktionen
- • Git Repositories - Unbegrenzte private Repos
- • Branch Policies - code review, build validation
- • Pull Requests - Code-Diskussion & Merge-Prozess
- - Semantic Versioning - Tags for releases
- • TFVC Support - Alternative zu Git (Legacy)
best practices
- • Klare Branching-Strategie - z.B. GitFlow, GitHub Flow
- - Regular commits - Small, atomic changes
- • Meaningful commit messages - traceability
- - Pull requests for all changes - Code quality
- • Branch Policies erzwingen - protection wichtiger Branches
Azure Pipelines (CI/CD)
Azure Pipelines is a powerful service for Continuous Integration (CI) and Continuous Delivery (CD). It enables automatic building, testing and deployment of applications in any environment.
Build Pipelines
Example YAML build pipeline (Node.js)
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
node.version: '18.x'
buildConfiguration: 'Release'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node.version)
displayName: 'Install Node.js $(node.version)'
- script: |
npm install
npm run build --if-present
displayName: 'npm install and build'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'build' # or 'dist', depending on the project structure
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
displayName: 'Archive build output'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publish Artifact: drop'Important build tasks
- • Tool Installer - Node, Python, Java, .NET Core SDK
- • npm, yarn, pip, Maven, Gradle, NuGet - Paketmanager
- • Build, Test, Publish - Projektspezifische Befehle
- • Code Analysis - SonarQube, WhiteSource Bolt
- • Docker Tasks - Build, Push, Run Images
Build best practices
- • Fast builds - optimization of build times
- • Reproducible builds - consistent results
- • Version build artifacts - traceability
- - Integrate security scans - early error detection
- • Set up notifications - get informed about failures
Release Pipelines
Release pipelines automate the deployment of build artifacts across different stages (e.g. dev, test, staging, prod). They enable controlled rollouts, approval workflows and configuration management per stage.
Kernkonzepte
- Stages: Logical units for deployment phases (dev, test, prod).
- Artifacts: Input for the pipeline (e.g. build output).
- Tasks: Individual deployment steps (e.g. App Service Deploy, Helm).
- Agent pools: Machines that execute deployment jobs.
- Variables & Variable Groups: Configurationsmanagement.
- Approvals & Gates: Control points for the release process.
YAML Pipelines as Code
Modern Azure Pipelines are often versioned as YAML files directly in the repository. This enables "pipelines as code", which improves traceability, reusability and collaboration. Both build and (multi-stage) release logic can be defined in YAML.
Azure Boards (Agile)
Azure Boards provides tools for agile project management, including Scrum and Kanban. It enables planning and tracking of work items such as epics, features, user stories and tasks.
Kanban Boards
Visualization of the workflow, WIP limits.
Scrum (Sprints & Backlogs)
Sprint planning, burndown charts.
Work Item Tracking
Customizable types and fields.
Dashboards & Queries
Progress tracking and reporting.
Azure Artifacts
Azure Artifacts enables hosting and sharing of packages such as NuGet, npm, Maven, Python (PyPI) and Universal Packages. It integrates seamlessly with Azure Pipelines for reliable package management.
- Feeds: Private or public package sources.
- Upstream Sources: Integration of external registries (npmjs.org, nuget.org).
- Symbol Server: Debugging symbols for .NET and native applications.
- Security & compliance: Access control and license scanning.
Azure Test Plans
Azure Test Plans offers a comprehensive solution for manual and exploratory testing. It supports test planning, test case management, execution and reporting.
Security & compliance
Securitysfeatures
- • Service Connections - secure access to external services
- • Secrets Management - Azure Key Vault Integration, Variable Groups
- • Branch Policies & Approvals - protection kritischer Resources
- • Security Scanning Tools - Integration in Pipelines (z.B. CredScan)
- - Audit logs - Tracking of changes
compliance
- • ISO 27001, SOC 1/2, HIPAA - certifications
- • Privacy Policy (GDPR) - tools and configurations
- • Access control - role-based permissions (RBAC)
- • Governance Policies - Azure Policy Integration
Integrationen & Erweiterungen
Azure DevOps can be customized and extended through numerous extensions from the Visual Studio Marketplace. It also offers extensive integration options with Azure services and third-party tools (e.g. GitHub, Jenkins, SonarQube).
