Organizing Repositories
Repositories are organized using a main branch and feature branches. The main branch holds the stable, production-ready code. Each new feature or bug fix is developed in its own feature branch. To protect the quality of the main branch, you set up branch protection rules in GitHub. These rules can require that changes be reviewed by other team members via a pull request before they can be merged into main. This process ensures that only approved and tested code reaches production.
Continuous Integration (CI)
Automated CI pipelines are configured in Azure DevOps. Whenever a developer pushes code to a feature branch, the CI pipeline automatically triggers. It builds the code and runs tests to check that the new changes work correctly and don't break anything existing. You can also add compliance checks, like verifying the code meets security or policy standards, directly within the pipeline. This automated testing provides fast feedback to developers.
Continuous Delivery (CD)
After code passes the CI tests, it moves into the continuous delivery stage. CD pipelines in Azure DevOps automate the deployment of that code to different environments, like a staging area for further testing. You can set up release pipelines that promote the built code through these environments. Deployment gates, such as a check for Azure Policy compliance, can be added to ensure a deployment only proceeds if it meets all organizational requirements, adding an extra layer of safety before production.
Maintaining Traceability
It is important to track why changes were made. You can link GitHub commits and pull requests to work items (like bugs or user stories) in Azure DevOps. This creates a clear history showing who made a change, when it was made, and which project requirement it fulfills. This traceability is crucial for auditing, understanding the impact of changes, and rolling back if necessary.
Collaboration and Communication
The pull request is the central tool for collaboration in this workflow. It provides a space for team discussion, code review, and approval before any code is merged. You can also configure notifications in Azure DevOps to alert teams about the status of builds and deployments. This keeps everyone informed and enables quick action if a pipeline fails, ensuring the entire development and release process runs smoothly.