You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current GitLab page describes OpenCode integration through GitLab Duo.
GitLab Duo is a paying functionality and is limited to workflows supported by GitLab.
GitLab-OpenCode is a community project that offers more flexiblity, better customization and easier setup to use OpenCode in GitLab. On the downside, it does not have the level of integration into GitLab as Duo does.
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/gitlab.mdx
+43-3Lines changed: 43 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,52 @@ title: GitLab
3
3
description: Use OpenCode in GitLab issues and merge requests.
4
4
---
5
5
6
+
## Integration options
7
+
8
+
There are at least two approaches to run OpenCode in GitLab:
9
+
10
+
- Run it in GitLab pipelines as a regular pipeline
11
+
- Run it through GitLab Duo
12
+
13
+
In both cases, OpenCode will run on your GitLab runners.
14
+
15
+
## GitLab CI integration
16
+
17
+
OpenCode works in a regular GitLab pipeline. You build it into a pipeline as a [CI component](https://docs.gitlab.com/ee/ci/components/)
18
+
19
+
---
20
+
21
+
### Features
22
+
23
+
-**Use custom configuration per job**: Configure OpenCode with a [custom configuration directory](./config/#custom-directory) to enable/disable functionality per OpenCode invocation.
24
+
-**Minimal setup**: The CI component sets up OpenCode in the background, you only need to create the OpenCode configuration and the initial prompt.
25
+
-**Flexible**: The CI component supports several inputs for customizing its behavior
26
+
27
+
### Setup
28
+
29
+
1. Store your OpenCode authentication JSON as a File type CI environment variables under **Settings -> CI/CD -> Variables**. Tip: Mark it "Masked and hidden".
30
+
2. Add code blocks like the following to your `.gitlab-ci.yml` file:
0 commit comments