Who does what in CI/CD? Roles and environments - Part 2
The roles and responsibilities in the CI/CD process, which role owns which phase and the environments a build goes through, with their gates.
Who does what in CI/CD? Roles and environments - Part 2
Automation alone doesn’t make CI/CD work. Someone has to decide what goes into a release, someone has to bless a build before it moves to the next environment, and someone has to keep the environments up and running. When these responsibilities are not clear, builds wait for approvals nobody knows they own, and environments drift apart until “it works in QA” means nothing. In the previous article, we discussed what CI/CD is, why we need it and the phases of the process. In this article, we are going to see the roles and responsibilities in the process and the environments a build goes through before it reaches production.
CI/CD Process series:
- What is CI/CD and why do we need it?
- Who does what in CI/CD? Roles and environments (this article)
- How does a change flow from commit to production in CI/CD?
- How to implement CI/CD with Azure DevOps?
TL;DR Summary
- Developers and Tech Leads own the code, unit tests, code quality and the Dev (integration) environment.
- QA Engineers and QA Leads own the product quality and authorize the promotion of builds to higher environments.
- BA and SDM own the Plan and Release phases: user stories, version number, UAT results and production sign-off.
- DevOps Engineers own the availability: environments, production releases, performance, DR and monitoring.
- Each environment (Local, Dev, QA, UAT, Performance, Production) is expected to reduce the risk incrementally and develop trust in the build.
Roles and Responsibilities
Developer & Tech Lead
The user stories created during the Plan phase are assigned to the developers in the team. The developers then create user story branches (or bug branches) as appropriate and work on implementing the story.
In addition to this, they are responsible for,
- Building and testing their implementation on their local machine
- Ensuring adherence to code quality checks
- Creating/updating unit tests for newly developed features or bug fixes
- Branch management (as per the team’s Git branching strategy)
- Participating in code reviews
- Ensuring the user story works fine in the Dev (integration) environment
The Tech Lead is also responsible for providing the most recent and correct build artefact when QA is ready for testing.
QA Engineer and QA Lead
QA Engineers focus on the product quality and review the features (user stories, bug fixes, etc.) based on the agreed Definition of Done.
The QA Leads authorize the builds to be promoted to a higher environment. The following are some of their primary responsibilities in the CI/CD process flow,
- Write end-to-end feature/acceptance tests to establish that a user journey is complete
- Run the automated tests and perform manual testing where applicable
- Perform smoke and regression tests
- Approve or reject builds
- Conduct performance tests and work with the users in UAT where applicable
Business Analyst and SDM
The Business Analyst (BA) and the Service Delivery Manager (SDM) are the front end of the process. Their roles apply primarily to the “Plan” and “Release” phases. Here are a few of their main responsibilities,
- Interact with actual users and come up with user stories that make sense to them
- Work with the team to arrive at a version number based on the agreed versioning strategy
- Coordinate and review results from UAT
- Sign off on the build to be deployed to production
- Create new stories based on feedback
DevOps Engineer
In our case, this role is performed by a mix of Development, QA and IT resources. The DevOps Engineer is responsible for the availability of the product. The role involves,
- Creating and maintaining the necessary environments
- Releasing the signed-off binaries to production
- Ensuring the necessary performance thresholds are met by configuring the infrastructure
- Readiness and availability of a DR (Disaster Recovery) environment
- Monitoring and reporting on critical metrics
Who owns which phase?
The following table maps the roles to the phases we discussed in the previous article,
| Phase | Primary owner | Supporting roles |
|---|---|---|
| Plan | SDM/BA | Development team, QA |
| Code | Developer | Tech Lead (code review) |
| Build | Development team | DevOps |
| Test | QA team | Developer, BA |
| Release & Deploy | SDM/BA | DevOps, QA (smoke test) |
| Operate & Optimize | DevOps | Development team |
Environments
The number and the purpose of the environments will differ for different applications. The purpose and the nature of work done in each environment are listed below, and these will help you to decide the need for a specific environment. However, for a majority of applications, we recommend the following environments.
The idea of these environments is that each environment is expected to reduce the risk incrementally and develop trust in the build. Think of it like a series of filters: each one catches a different kind of problem, so what reaches production has been checked from every angle.
Local [Owned by: Development team]
This is the local development environment for the developer. Most of the dependencies (tools, libraries, services, etc.) are available locally.
The main purpose of this environment is to make sure the user story or fix is done cleanly, correctly and optimized, and it follows the organizational and industry best practices. The code is also accompanied by the necessary amount of unit tests.
Where possible, static analysis tools to check style conformity and to do vulnerability assessment can be included in this environment, so the feedback is early.
The expected output from this environment is a build that passes style conformity and vulnerability assessment checks, and has a reduced risk of broken logic, confirmed with unit tests.
Dev [Owned by: Development team]
The Dev environment is the place where the source code for different user stories of the sprint is integrated, built and tested. Every developer tests his/her feature to make sure it is working well.
On top of the tests that were conducted in the local environment, where only the feature or the bug fix was tested, here the integration of the different features from different user stories is tested.
Info: The availability of Build Verification Tests (BVT), which are a collection of test cases around the core functionality of the application, would increase productivity. These BVTs will be linked to the build process, such that when a BVT fails, the build fails and the work gets assigned back to the developer.
QA [Owned by: QA team]
On approval from the QA Lead, the build blessed by the Tech Lead will be deployed to QA. In this environment, QA will re-validate the features that were developed and tested by the developers in the local and Dev environments.
While most of the environment will remain similar to the other environments, QA will add its own set of tools and libraries needed for the testing.
This environment adds another quantum of trust to the build, this time blessed by QA.
UAT [Owned by: QA team]
The UAT (User Acceptance Testing) environment is where the majority of the system tests, end-to-end tests and regression tests happen. On approval from the QA Lead, the build validated in the QA environment will be deployed to UAT. Once QA signs off on the build, the end users/BA/SDM can be notified and the necessary applications can be made available for acceptance testing.
Note: It is possible to make the QA environment redundant and do the same testing in the UAT environment. However, this would be a team specific decision. For example, when an application needs the acceptance tests to continue for a few days, it is better to have separate QA and UAT environments.
Performance [Owned by: QA team]
The performance testing environment should ideally be an isolated environment with just enough software to run and test the builds.
Performance testing should be done as early as possible. With complete automation, every build from the Dev (integration) environment can be automatically deployed to the performance environment for testing. However, when that is not the case, running the performance test during UAT or slightly ahead of it will be a reasonable trade-off.
Production
Once all the validations (UAT, performance, security, etc.) have been completed and the build is versioned according to the items in the release, the build will be deployed to the production environment after the necessary approvals from the CAB (Change Advisory Board) and the SDM. A final smoke test and sign-off will be done on the production environment.
Environments at a glance
| Environment | Owner | Purpose | Gate to get in | Expected output |
|---|---|---|---|---|
| Local | Development team | Build the story/fix cleanly with unit tests | - | Code that passes style, vulnerability and unit test checks |
| Dev | Development team | Integrate and test all stories of the sprint | Successful CI build (automatic) | Integrated features verified by developers and BVTs |
| QA | QA team | Re-validate the features | Tech Lead and QA Lead approval | Build blessed by QA |
| UAT | QA team | System, end-to-end, regression and acceptance tests | QA Lead approval | Build accepted by users/BA/SDM |
| Performance | QA team | Validate performance thresholds | Build from Dev or UAT | Performance test results |
| Production | DevOps | Serve real users | CAB and SDM approval | Live build, smoke tested and signed off |
Must Be Aware: Keep the environments alike in all respects. Avoid tweaking the settings of an environment by adding a manual step or two; it compounds as the number of environments increases and impairs automation.
Wrap up
In this article, we have looked at the roles and responsibilities in the CI/CD process, which role owns which phase, and the environments a build goes through along with the purpose and the gate of each. I really appreciate that you took the time to read this article. In the next article, I will walk you through the end-to-end workflow, step by step, from a code check-in to the production deployment, and what happens when a build fails.
Related Posts
What is CI/CD and why do we need it? - Part 1
What CI, Continuous Delivery and Continuous Deployment mean, why we need CI/CD, the goals of our process and its six phases.
How does a change flow from commit to production in CI/CD? - Part 3
How a change flows from commit to production: the release branch workflow, CI and CD steps, quality gates and how we handle build failures.
How to implement CI/CD with Azure DevOps? - Part 4
Implement the CI/CD workflow with Azure DevOps: pipeline building blocks, recommended tools and tasks, a CI pipeline skeleton and lessons learned.