Helix Core — version control from Perforce — tracks, manages, and secures changes to all your digital assets, including large binary files. Scale your infrastructure, support your remote teams, and move faster.
Want to learn more? Explore version control branching.
Full Video Transcript
Version Control is the foundation for DevOps. But not all version control is created equal. Companies with complex product development projects need a VCS that can accelerate global development.
Helix Core is that VCS. And using Perforce Streams can unite large teams by allowing you to manage codelines more efficiently. Streams has benefits for everyone on your team.
Developers love the ability to switch between codelines, manage work in progress more easily, and merge with minimal conflicts.
And for build engineers and operations professionals, Streams can help you accelerate DevOps. Let’s review how Streams can organize your projects and streamline CI/CD.
Mainline Branching Model
Most VCS systems, notably Git, implement a tree model. The health of a tree model is defined by the number of branches that continue to grow as the tree gets taller. Then, these branches have their own child branches.
The problem is that managing numerous branches is painful. As a result, teams artificially reduce and/or limit branching because it is too difficult to merge.
Streams implements the mainline branching model, out of the box. This model helps you organize release and development codelines. It provides “guardrails” based on industry best practices. This prevents chaos. And it ensures that branches from numerous developers can more easily come together for builds.
With large projects branches are used to:
Create Releases (e.g., rel2.1, rel2.2, rel2.3)
Develop New Versions (e.g., dev2.3)
Release Workflows Using Streams
In mainline model, the most stable code is at top. This stream should be production-ready. It is copied from the mainline, tested, then released.
In complex systems, you may need to maintain several releases. These long-lived streams are not available for developers to work on locally, like with small teams using Git. Each release stream can be maintained in Helix Core.
Development Workflows Using Streams
Streams help you organize development codelines to build new versions and manage bug fixes.
Development codelines are the least stable. Generally, code is copied up to release stream from the mainline and merged down to development streams.
In this model, developers still make streams (or branches) on their workstations, with a workflow similar to Git. The difference is when they complete their work, the changes goes back to the codeline their team is working on.
Sometimes, patches are necessary to handle defects or security vulnerabilities. In emergency situations, changes might need to be applied to a release in production. Task streams can be used because they are short-lived streams.
Once the emergency is over, code from the task stream can be merged down to the mainline, tested, and then pushed out other release and dev streams. Because it does not make sense to maintain the history of unchanged files, only the necessary history is preserved from the task stream. The history of the changed files that went into the mainline is saved.
DevOps Automation and Control
DevOps is all about automation. At the start of a project or release, a senior developer or lead would create a would create a new stream (for example, dev2.3). Perforce Streams lets you automate this creation, allowing teams to self-service.
After the project is created, developers can commit to that codeline (gated by CI). All the codelines in a project are then managed by DevOps/release engineers.
With Streams, release engineers do not need to rope in a bunch of code from a variety of different places. It streamlines automation for CI processes allowing teams to pull together files faster for tests and builds.
For CI/CD, Virtual Streams let you “filter” the workspace to see only the files you need without needing to script together traditional branches.
For example, in the build environment you might only need the compiled artifacts. With Virtual Streams, you get a view into a stream that focuses only on those files that necessary, not the entire stream.
Virtual Streams help you filter out what developers/DevOps do not need to:
- Saves diskspace
- Saves sync time
- Saves unnecessary merge down actions
Virtual Streams can also share (import) common files that you do not want to branch like:
- Other binary assets
Flexibility of Streams
Streams can be modified with keywords: share, isolate, exclude, and import. These keywords drive automation. They do the work for you, instead of having to share and exclude on a per-file basis.
Share is the simplest keyword. When added to a stream, it shares everything that's underneath the stream with everyone. So, when an additional stream is created from it, everything will be copied. All the files in the stream will be synced to a workspace, allowing developers to modify every single file (if they have permissions for it).
With the term isolate, changes are applied only within a specific stream. They won’t get integrated or pushed into other streams. For example, maybe there are specific libraries needed for a stream, but you don’t want them propagated around. You can import from outside a stream, and then isolate the files.
Using exclude, you can specify certain paths to be left out of the workspace.
Import and Import+
With import, you can bring other streams –– or even classic depot paths –– into a stream. These paths could include build artifacts, artwork for a game, or other source code components. By design, imports are read-only, allowing then to be used to builds and deployments.
If you are dealing with multiple development components, you might want to have to change several components at the same time. In that case, you can mark an import as import+. This makes it possible to write to that stream as well read, if you have permissions.
Using import and import+, DevOps teams can break down large complex projects into smaller builds. This is especially helpful for projects using Component Based Development. Each component can follow its own build and release cycle.
Use Streams in Your DevOps Pipeline
In summary, Perforce Streams makes life easier for developers by removing many obstacles that distract and take away from productivity. And for DevOps teams, it checks all the main principles to help you deliver CI/CD.
Streams is a powerful tool with unique features that accelerate every part of your pipeline. Not a customer yet? TRY TODAY