In an Agile Scrum framework, development teams work in sprints (typically 2-4 weeks) to deliver functional increments of the software. By integrating CI/CD pipelines, teams can automate building, testing, and deploying code to ensure reliable and fast delivery. Azure DevOps brings these elements together, providing a seamless platform to manage, automate, and continuously deliver the product within a Scrum framework.


Overview: CI/CD and Agile Scrum in Azure DevOps

In an Agile Scrum framework, development teams work in sprints (typically 2-4 weeks) to deliver functional increments of the software. By integrating CI/CD pipelines, teams can automate building, testing, and deploying code to ensure reliable and fast delivery. Azure DevOps brings these elements together, providing a seamless platform to manage, automate, and continuously deliver the product within a Scrum framework.

1. Azure Repos: Source Control in CI/CD and Scrum

Azure Repos is the centralized version control in Azure DevOps and plays a crucial role in CI/CD and Agile Scrum practices.

  • Branching Strategy: In Agile Scrum, developers often create branches based on user stories or tasks within each sprint (such as feature-xyz or bugfix-abc). These branches allow isolated development, minimizing disruptions to the main codebase. Once a feature or bug fix is complete, the branch is merged into the main branch (often main or develop). This merge initiates the CI/CD pipeline, which automatically runs builds and tests on the integrated code to ensure that it’s production-ready.
  • Pull Requests and Code Reviews: Pull Requests (PRs) in Azure Repos facilitate code reviews before merging to the main branch. PRs help ensure that the code adheres to coding standards, passes automated tests, and aligns with team guidelines. Azure DevOps allows teams to set mandatory policies for PRs, such as requiring reviews, automated checks, or successful build results before merging. In the Scrum process, PR reviews contribute to defining “done” criteria for user stories, promoting quality control within each sprint.
  • Linking Work Items: Developers can associate commits and PRs with Work Items (e.g., tasks, bugs, or user stories) tracked in Azure Boards. This linkage provides traceability, allowing the team to see the progress of work items and ensuring that each piece of code is linked to a backlog item in Scrum. This also supports the CI/CD principle of delivering traceable, incrementally developed features.

2. Azure Pipelines in CI/CD and Scrum

Azure Pipelines handles both the Build and Release pipelines, essential components of CI/CD. By automating build, test, and deployment processes, Azure Pipelines ensure rapid and reliable delivery within the Scrum framework.

2.1 Build Pipeline

The Build Pipeline is the first automated step in CI/CD, responsible for validating code changes and creating reusable artifacts.

  • Continuous Integration (CI): When code is pushed to the repository (especially in main branches like main or develop), the Build Pipeline automatically compiles the code, runs tests, and produces build artifacts. This immediate feedback allows developers to identify and fix integration issues early, crucial for the iterative nature of Scrum.
  • Automated Testing: The Build Pipeline executes automated unit and integration tests to validate that the code meets quality standards. This aligns with the Scrum objective of ensuring “done” increments by verifying functional code through continuous testing.
  • Artifact Publishing: Once the build and tests pass, the Build Pipeline generates and publishes artifacts (e.g., binaries, Docker images, packages) to be used by the Release Pipeline. These artifacts are versioned, enabling traceable and consistent deployments across environments.

2.2 Release Pipeline

The Release Pipeline manages deployment, delivering the built artifacts to various environments like staging, QA, and production. It enables Continuous Deployment (CD) by automating deployments and reducing manual intervention.

  • Multi-Environment Deployment: The Release Pipeline can deploy to multiple environments (e.g., Development, QA, Staging, Production) based on predefined workflows. For example, after the code is approved in staging, it may be automatically or manually promoted to production. This approach aligns with Scrum, as teams can demonstrate working increments in QA or Staging environments before final production releases.
  • Gate Conditions and Approvals: Azure DevOps allows for conditional checks, or “gates,” that must pass before advancing the deployment. Teams can set up approvals or compliance checks to meet organizational standards or Scrum “definition of done” criteria for each increment.
  • Rollback and Version Control: If an issue is detected in production, the Release Pipeline can trigger an automatic rollback to a previous stable version, supporting rapid recovery. Rollbacks ensure that each increment meets the quality standards expected in Scrum, even after deployment.

3. Artifacts in CI/CD and Scrum

Azure Artifacts is the storage and management solution for build outputs and dependencies, providing a centralized location to store packages (e.g., NuGet, npm, Maven).

  • Package Management: In Scrum, multiple teams may work on different features or microservices that rely on shared packages or libraries. Azure Artifacts allows teams to publish, version, and share these packages within the organization, enabling easy access to dependencies required across various sprints or features.
  • Versioned Artifacts: Every build pipeline generates versioned artifacts that the Release Pipeline uses. This versioning ensures consistency and traceability in deployments, crucial for CI/CD as it guarantees that the exact artifact used in staging is deployed to production. In Scrum, this aligns with delivering reliable increments, as the team can verify that the same build passes all quality checks in different environments.
  • Reuse and Collaboration: With Azure Artifacts, dependencies are accessible and reusable, which speeds up development and testing within Scrum. Teams don’t need to rebuild dependencies from scratch, facilitating faster iterations in CI/CD.

4. Test Plans in CI/CD and Scrum

Azure Test Plans is a tool for managing and executing test cases, essential for quality assurance within CI/CD and Scrum practices.

  • Manual and Automated Testing: Test Plans allow the team to execute manual and automated tests. Automated tests are typically integrated into the CI/CD pipeline, providing immediate feedback on code quality with each commit. Manual testing, on the other hand, allows testers to validate complex user stories or edge cases that are harder to automate, aligning with Scrum’s emphasis on delivering fully tested, working increments.
  • Test Suites and Test Cases: In Scrum, testers create test cases for each user story in a sprint. Test cases are organized into test suites within Azure Test Plans and linked to Work Items. This structure ensures that each story or feature increment undergoes specific tests, and results are tracked, meeting the Scrum goal of having a “definition of done” that includes successful test validation.
  • Traceability and Reporting: Test Plans provide traceability from user stories to test results, allowing the Scrum team to confirm that all tests were executed successfully. Detailed reports allow teams to assess the quality of each increment in real-time, facilitating data-driven retrospectives and sprint planning.

End-to-End Workflow in CI/CD and Agile Scrum with Azure DevOps

  1. Planning in Azure Boards: The sprint starts with planning in Azure Boards, where tasks and user stories are created and prioritized in the backlog. These are linked with code changes in Repos, providing visibility into which work items are being addressed.
  2. Development in Azure Repos: Developers work on code within branches that correspond to stories or tasks. PRs are submitted for code reviews, which are part of Scrum’s commitment to quality, enabling fast feedback loops and accountability.
  3. Continuous Integration with Build Pipeline: Upon merging code to the main branch, the Build Pipeline compiles the code, runs automated tests, and publishes artifacts. This practice aligns with Scrum’s commitment to deliver tested increments.
  4. Continuous Deployment with Release Pipeline: The Release Pipeline deploys artifacts to various environments, enabling the team to test increments in a production-like environment before the sprint ends. Approvals and gate checks in each environment ensure compliance and quality.
  5. Testing and Validation in Test Plans: The team runs both automated and manual tests, linked to user stories and tasks. Test results are recorded, ensuring that each feature meets the “done” criteria and can be demonstrated during sprint reviews.
  6. Review and Retrospective: Sprint reviews and retrospectives leverage data from Azure DevOps, providing insights into what was accomplished, any issues encountered, and improvements for future sprints.

By combining Azure DevOps with CI/CD and Scrum, development teams achieve streamlined workflows, quicker feedback loops, and higher-quality deliverables, supporting Agile goals while maintaining flexibility in development and deployment processes.

Edvaldo Guimrães Filho Avatar

Published by

Categories: