docs: gitlab

This commit is contained in:
Jay V 2025-08-20 17:51:16 -04:00
parent 8b01676ec0
commit 256d074411
2 changed files with 96 additions and 70 deletions

View file

@ -67,7 +67,14 @@ export default defineConfig({
{
label: "Usage",
items: ["docs/tui", "docs/cli", "docs/ide", "docs/share", "docs/github"],
items: [
"docs/tui",
"docs/cli",
"docs/ide",
"docs/share",
"docs/github",
"docs/gitlab"
],
},
{

View file

@ -19,10 +19,21 @@ Mention `@opencode` in a comment, and opencode will execute tasks within your Gi
## Setup
Refer to the [GitLab CLI agents docs](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/)
for detailed setup instructions.
opencode runs in your GitLab CI/CD pipeline, here's what you'll need to set it up:
Here is an example of the agent configuration:
:::tip
Check out the [**GitLab docs**](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/) for up to date instructions.
:::
1. Configure your GitLab environment
2. Set up CI/CD
3. Get an AI model provider API key
4. Create a service account
5. Configure CI/CD variables
6. Create a flow config file, here's an example:
<details>
<summary>Flow configuration</summary>
```yaml
image: node:22-slim
@ -95,12 +106,20 @@ variables:
- GITLAB_HOST
```
</details>
You can refer to the [GitLab CLI agents docs](https://docs.gitlab.com/user/duo_agent_platform/agent_assistant/) for detailed instructions.
---
## Examples
Here are some examples of how you can use opencode in GitLab.
:::tip
You can configure to use a different trigger phrase than `@opencode`.
:::
- **Explain an issue**
Add this comment in a GitLab issue.