Connecting gitStream to GitLab in LinearB
Integrate gitStream with your GitLab account in LinearB
Updated
by Steven Silverstone
Overview
To integrate gitStream with your GitLab account in LinearB, follow these steps:
- Connect gitStream
- Create a CM Repository with Your CI Script
- Set Up Automation Rules
When using gitStream with GitLab, all automations are executed under the GitLab account that was initially connected to LinearB. It is recommended to use a dedicated service account (e.g., gitStream-cm
) to provide better clarity and tracking of automated actions.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738574694413/line-image.png)
Step 1: Connect gitStream to GitLab
- Navigate to Settings > Git in LinearB.
- Click Connect gitStream next to your GitLab integration.
- You can either use an existing GitLab integration or create a new one if needed.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738575194252/screenshot-2025-02-03-at-11-32-55.png)
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738575316195/line-image.png)
Step 2: Create a CM Repository with Your CI Script
- In GitLab, create a new repository (CM project) within the same group or a parent group of the target repositories.
- In the default branch (usually
main
ormaster
), create a.gitlab-ci.yml
file. - Add the necessary CI configuration found here: gitStream GitLab CI Configuration.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738576380085/screenshot-2025-02-03-at-11-52-38.png)
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738575424377/line-image.png)
Step 3: Set Up gitStream Automation Rules
You can configure gitStream automation rules for either a single repository or for your entire GitLab organization. Select the appropriate option below based on your needs:
- View code content and examples for both single and org level configurations: gitStream Rules Configuration
Single Repository Configuration
- In your repository's default branch (typically
main
ormaster
), create a file with a name ending in.cm
(e.g.,gitstream.cm
). - This file should be placed within a
.cm
directory. - Inside this file, define the YAML configuration that specifies the workflows and automation rules to be applied to this specific repository.
- You can name the file anything, as long as it ends with
.cm
to ensure gitStream recognizes it.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738576719120/screenshot-2025-02-03-at-11-53-45.png)
Organization-Level Configuration
- For organization-wide rules, create a
gitstream.cm
file in the root directory of your CM repository's default branch (usuallymain
ormaster
). - This file will contain a YAML configuration that determines the workflows and automation rules applicable across all repositories within your GitLab organization.
- As with the single repository configuration, the file can be named anything as long as it ends in
.cm
.
By setting up these automation rules, you can define custom workflows tailored to individual repositories or implement standardized processes across your entire organization.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738576814025/screenshot-2025-02-03-at-11-53-56.png)
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738576794154/line-image.png)
Step 4: Connect Repositories to gitStream
- Connect the CM repository you created.
- Select additional repositories that you want gitStream to monitor.
- You can choose all repositories or specific ones.
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738577238863/screenshot-2025-02-03-at-12-06-44.png)
![](https://files.helpdocs.io/g5c9ycw6ao/articles/0xxpvue4s9/1738577320837/line-image.png)
Additional Resources
How did we do?
gitStream Documentation