Collaborate Using Continuous Integration
Learning Objectives
After completing this unit, you’ll be able to:
- Explain the purpose of continuous integration.
- Explain how continuous integration works.
- Define version control.
What Is Continuous Integration?
Imagine you and your team are working on a project, but you’re unable to check if your work fits with what the other teammates have done. In fact, you are unable to even see any of their work. Sounds like a problem waiting to happen, right?
It certainly can be. To avoid the collision of individual work, software teams have turned to a practice called continuous integration, or CI for short.
CI is the process of frequently integrating changes from team members into one shared workspace. In software, this workspace is called a repository. Instead of merging all the work at the end of a project and waiting to find conflicts, it allows team members to continuously merge, or commit, their code in increments.
Click through the cards below to learn about the key traits of continuous integration and how each helps teams deliver better products faster.
Explore How Continuous Integration Works
Continuous integration is often called a pipeline. As teams develop code, they’re creating the pipeline. When someone on the team is ready to write a batch of code, they pull from the repository of shared code that has been developed up to that point. When they are done with that batch of code, they commit it back into the pipeline so that their changes can be checked with automated tests and the source code can be updated for everyone.
Now teams can get feedback early on if the new code works with the existing code. And it’s easier to fix. Otherwise, teams are testing more changes later in development, which creates a backlog of issues that they will have to retroactively fix.
Establish Version Control
Since teams commit changes more frequently, they need a system to track them all. Enter version control as a way to manage these ongoing changes. Let’s dig a little deeper into a few key concepts involved with version control.
Source code management is the practice of tracking modifications to source code, which allows multiple developers to work on the same codebase.
A source code repository is a place to store code to make it useful for collaboration. It keeps files and allows individuals to commit their changes alongside other collaborators. This synchronization helps teams make sure everyone is working from the most current code.
A repository can also manage risk. It doesn’t just update changes to the code; it stores past versions of it as well. Think of it as a way of saving drafts of the work as changes occur. By keeping a history of all the changes, teams can return to previous versions if an issue arises while also providing visibility into different teammates’ work.
Watch the video to see how this all comes together.