forked from devstar/docs
梳理了DevStar AI+ DevOps文档大纲,整理了部分目录结构
This commit is contained in:
@@ -70,31 +70,27 @@ function sidebarDevStar(): DefaultTheme.SidebarItem[] {
|
||||
{
|
||||
text: 'DevStar Studio',
|
||||
link: '/src/devstar/index',
|
||||
items: [
|
||||
]
|
||||
} as any,
|
||||
{
|
||||
text: 'AI+ DevOps',
|
||||
link: '/src/devstar/ai-devops',
|
||||
collapsible: true, // 使整个组可折叠
|
||||
collapsed: false, // 默认展开
|
||||
items: [
|
||||
{ text: 'AI+ DevOps', link: '/src/devstar/ai-devops' },
|
||||
{ text: 'AI Code Review', link: '/src/devstar/ai-code-reveiw' },
|
||||
{ text: 'MCP Server', link: '/src/devstar/mcp-server' },
|
||||
]
|
||||
} as any,
|
||||
{
|
||||
text: '安装',
|
||||
collapsible: true, // 使整个组可折叠
|
||||
collapsed: true, // 默认展开
|
||||
collapsed: false, // 默认展开
|
||||
items: [
|
||||
{ text: '对比Gitea与其它Git托管工具', link: 'https://docs.gitea.com/zh-cn/installation/comparison' },
|
||||
{ text: '数据库准备', link: 'https://docs.gitea.com/zh-cn/installation/database-prep' },
|
||||
// { text: '数据库准备', link: '/src/document/installation/from-source' },
|
||||
{ text: '使用shell脚本安装', link: '/src/devstar/installation/install-via-shell-script' },
|
||||
{ text: '使用二进制文件安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-binary' },
|
||||
{ text: '包管理器安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-package' },
|
||||
{ text: '使用源代码安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-source' },
|
||||
{ text: '在Linux中以service方式运行', link: 'https://docs.gitea.com/zh-cn/installation/linux-service' },//
|
||||
{ text: '注册为Windows服务', link: 'https://docs.gitea.com/zh-cn/installation/windows-service' },
|
||||
{ text: '使用Docker安装(rootless)', link: 'https://docs.gitea.com/zh-cn/installation/install-with-docker-rootless' },
|
||||
{ text: '使用Docker安装', link: 'https://docs.gitea.com/zh-cn/installation/install-with-docker' },
|
||||
{ text: '在Kubernetes中安装Gitea', link: 'https://docs.gitea.com/zh-cn/installation/install-on-kubernetes' },
|
||||
{ text: '在云服务器上安装Gitea', link: 'https://docs.gitea.com/zh-cn/installation/install-on-cloud-provider' },
|
||||
{ text: '从旧版Gitea升级', link: 'https://docs.gitea.com/zh-cn/installation/upgrade-from-gitea' },
|
||||
{ text: '快速部署指南', link: 'src/devstar/install/quick-start' },
|
||||
{ text: '云原生环境部署指南', link: 'src/devstar/install/install-k8s' },
|
||||
{ text: 'app.ini配置文件', link: 'src/devstar/install/app-ini' },
|
||||
]
|
||||
} as any,
|
||||
{
|
||||
@@ -128,7 +124,7 @@ function sidebarDevStar(): DefaultTheme.SidebarItem[] {
|
||||
collapsible: true, // 使整个组可折叠
|
||||
collapsed: true, // 默认展开
|
||||
items: [
|
||||
{ text: '结合AI快速开始', link: 'devstar/usage/quick-start-with-ai' },
|
||||
{ text: 'devcontainer', link: 'src/devstar/usage/quick-start-with-ai' },
|
||||
{
|
||||
text: 'Actions',
|
||||
collapsible: true, // 使整个组可折叠
|
||||
|
||||
32
src/devstar/ai-code-reveiw.md
Normal file
32
src/devstar/ai-code-reveiw.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# AI Code Review
|
||||
|
||||
### AI Code Review与CI/CD工作流
|
||||
|
||||
在您的项目中添加.gitea/workflows/code-review.yml , 这里使用kekxv/AiReviewPR@v0.0.6来进行AI Code Review
|
||||
```
|
||||
name: ai-reviews
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Review code
|
||||
uses: kekxv/AiReviewPR@v0.0.6
|
||||
with:
|
||||
model: ${{ vars.MODEL }}
|
||||
host: ${{ vars.OLLAMA_HOST }}
|
||||
REVIEW_PULL_REQUEST: false
|
||||
```
|
||||
DevStar代码托管平台中项目设置、用户设置和后台管理中都可以设置变量vars.MODEL、vars.OLLAMA_HOST等。
|
||||
|
||||
### AI Code Review详解
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
DevStar AI+ DevOps 是一个完整的AI驱动研发平台解决方案,通过集成 DevStar平台、代码大语言模型、Gitea MCP Server和 AI Code Tools(Cursor、Claude Code、iFlow等),为开发者提供智能化研发支撑体系。
|
||||
|
||||
## 🚀 快速部署
|
||||
## 🚀 快速部署配置指南
|
||||
|
||||
### 一、部署 DevStar 代码托管平台
|
||||
|
||||
@@ -18,6 +18,8 @@ sudo devstar start
|
||||
|
||||
### 二、Ollama私有部署代码大模型
|
||||
|
||||
> 如您使用第三方API及Token可以跳过这一部分。
|
||||
|
||||
Ubuntu-20.04下完成安装:
|
||||
```
|
||||
curl -fsSL https://ollama.com/install.sh | sh
|
||||
@@ -53,7 +55,9 @@ systemctl restart ollama
|
||||
|
||||
安装完成后,我们得到API URL,比如http://172.16.94.26:11434/api/tags model比如qwen2.5-coder:32b token比如TOKEN***************
|
||||
|
||||
### 三、配置AI Code Review到CI/CD工作流中
|
||||
### 三、在项目中使用代码大模型
|
||||
|
||||
#### 配置AI Code Review到CI/CD工作流中
|
||||
|
||||
在您的项目中添加.gitea/workflows/code-review.yml , 这里使用kekxv/AiReviewPR@v0.0.6来进行AI Code Review
|
||||
```
|
||||
@@ -81,6 +85,77 @@ jobs:
|
||||
```
|
||||
DevStar代码托管平台中项目设置、用户设置和后台管理中都可以设置变量vars.MODEL、vars.OLLAMA_HOST等。
|
||||
|
||||
### 四、使用ai-develops项目模板完整演示DevStar AI+ DevOps的CI/CD工作流及AI Code Review
|
||||
#### 安装配置MCP Server
|
||||
|
||||
在 VS Code 中使用,要快速安装,请使用如下安装按钮。
|
||||
|
||||
[](https://insiders.vscode.dev/redirect/mcp/install?name=gitea&inputs=[{%22id%22:%22gitea_token%22,%22type%22:%22promptString%22,%22description%22:%22Gitea%20Personal%20Access%20Token%22,%22password%22:true}]&config={%22command%22:%22docker%22,%22args%22:[%22run%22,%22-i%22,%22--rm%22,%22-e%22,%22GITEA_ACCESS_TOKEN%22,%22docker.gitea.com/gitea-mcp-server%22],%22env%22:{%22GITEA_ACCESS_TOKEN%22:%22${input:gitea_token}%22}}) [](https://insiders.vscode.dev/redirect/mcp/install?name=gitea&inputs=[{%22id%22:%22gitea_token%22,%22type%22:%22promptString%22,%22description%22:%22Gitea%20Personal%20Access%20Token%22,%22password%22:true}]&config={%22command%22:%22docker%22,%22args%22:[%22run%22,%22-i%22,%22--rm%22,%22-e%22,%22GITEA_ACCESS_TOKEN%22,%22docker.gitea.com/gitea-mcp-server%22],%22env%22:{%22GITEA_ACCESS_TOKEN%22:%22${input:gitea_token}%22}}&quality=insiders)
|
||||
|
||||
也可以在项目中添加到 .vscode/mcp.json 文件如下:
|
||||
|
||||
```
|
||||
{
|
||||
"mcp": {
|
||||
"inputs": [
|
||||
{
|
||||
"type": "promptString",
|
||||
"id": "gitea_token",
|
||||
"description": "Gitea 个人访问令牌",
|
||||
"password": true
|
||||
}
|
||||
],
|
||||
"servers": {
|
||||
"gitea-mcp": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITEA_HOST",
|
||||
"-e",
|
||||
"GITEA_ACCESS_TOKEN",
|
||||
"docker.gitea.com/gitea-mcp-server"
|
||||
],
|
||||
"env": {
|
||||
"GITEA_HOST": "--host http://172.16.94.26",
|
||||
"GITEA_ACCESS_TOKEN": "${input:gitea_token}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 配置AI IDE/CLI使用私有大模型及MCP Server
|
||||
|
||||
* Copilot,简要文字描述,不要上太多图,可以提供官方配置链接
|
||||
* Cursor
|
||||
* Continue
|
||||
* ...
|
||||
|
||||
## 🚀 DevStar AI+ DevOps演示
|
||||
|
||||
在前面部署配置的基础上,我们以VSCode + Copilot或者Continue等为例,演示AI生成代码、触发CI/CD工作流及AI Code Review
|
||||
|
||||
### 创建一个项目
|
||||
|
||||
使用ai-develops项目模板创建项目
|
||||
|
||||
todo
|
||||
|
||||
### AI生成代码
|
||||
|
||||
todo
|
||||
|
||||
### 提交PR
|
||||
|
||||
todo
|
||||
|
||||
### AI Code Review
|
||||
|
||||
todo
|
||||
|
||||
### 合并PR
|
||||
|
||||
todo
|
||||
@@ -3,7 +3,7 @@ outline: deep
|
||||
weight: 2
|
||||
---
|
||||
|
||||
# 快速开始
|
||||
# 使用shell脚本安装
|
||||
|
||||
如果您是在Windows环境下,请在cmd命令行下先运行如下命令:
|
||||
```md
|
||||
39
src/devstar/install/quick-start.md
Normal file
39
src/devstar/install/quick-start.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
outline: deep
|
||||
weight: 2
|
||||
---
|
||||
|
||||
# 快速开始
|
||||
|
||||
如果您是在Windows环境下,请在cmd命令行下先运行如下命令:
|
||||
```md
|
||||
powershell wsl --install -d Ubuntu-20.04
|
||||
```
|
||||
如果以上命令无法自动完成安装WSL,可以手动执行如下消耗完成命令安装:
|
||||
```md
|
||||
dism.exe /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /All /LimitAccess /All
|
||||
dism.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All /LimitAccess
|
||||
```
|
||||
在Ubuntu-20.04下完成安装:
|
||||
```md
|
||||
wget -c https://devstar.cn/assets/install.sh && chmod +x install.sh && sudo ./install.sh
|
||||
devstar help
|
||||
------------------------------------------------------------------------
|
||||
DevStar usage help:
|
||||
help, -h, --help, Help information
|
||||
start Start DevStar Studio
|
||||
--port=<arg> Specify the port number (default port is 80)
|
||||
--ssh-port=<arg> Specify the ssh-port number (default ssh-port is 2222)
|
||||
--version=<arg> Specify the DevStar Studio Image Version (default verson is latest)
|
||||
--image=<arg> Specify the DevStar Studio Image example: devstar-studio:latest
|
||||
stop Stop the running DevStar Studio
|
||||
logs View the logs of the devstar-studio container
|
||||
clean Clean up the running DevStar Studio, including deleting user data. Please use with caution.
|
||||
------------------------------------------------------------------------
|
||||
sudo devstar start
|
||||
...
|
||||
-------------------------------------------------------
|
||||
DevStar started in http://192.168.234.210:80 successfully!
|
||||
-------------------------------------------------------
|
||||
```
|
||||
然后通过浏览器打开http://192.168.234.210:80 完成后配置安装,默认第一个注册用户为管理员账户。
|
||||
51
src/devstar/mcp-server.md
Normal file
51
src/devstar/mcp-server.md
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
# MCP Server
|
||||
|
||||
### 快速安装配置MCP Server
|
||||
|
||||
在 VS Code 中使用,要快速安装,请使用如下安装按钮。
|
||||
|
||||
[](https://insiders.vscode.dev/redirect/mcp/install?name=gitea&inputs=[{%22id%22:%22gitea_token%22,%22type%22:%22promptString%22,%22description%22:%22Gitea%20Personal%20Access%20Token%22,%22password%22:true}]&config={%22command%22:%22docker%22,%22args%22:[%22run%22,%22-i%22,%22--rm%22,%22-e%22,%22GITEA_ACCESS_TOKEN%22,%22docker.gitea.com/gitea-mcp-server%22],%22env%22:{%22GITEA_ACCESS_TOKEN%22:%22${input:gitea_token}%22}}) [](https://insiders.vscode.dev/redirect/mcp/install?name=gitea&inputs=[{%22id%22:%22gitea_token%22,%22type%22:%22promptString%22,%22description%22:%22Gitea%20Personal%20Access%20Token%22,%22password%22:true}]&config={%22command%22:%22docker%22,%22args%22:[%22run%22,%22-i%22,%22--rm%22,%22-e%22,%22GITEA_ACCESS_TOKEN%22,%22docker.gitea.com/gitea-mcp-server%22],%22env%22:{%22GITEA_ACCESS_TOKEN%22:%22${input:gitea_token}%22}}&quality=insiders)
|
||||
|
||||
也可以在项目中添加到 .vscode/mcp.json 文件如下:
|
||||
|
||||
```
|
||||
{
|
||||
"mcp": {
|
||||
"inputs": [
|
||||
{
|
||||
"type": "promptString",
|
||||
"id": "gitea_token",
|
||||
"description": "Gitea 个人访问令牌",
|
||||
"password": true
|
||||
}
|
||||
],
|
||||
"servers": {
|
||||
"gitea-mcp": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITEA_HOST",
|
||||
"-e",
|
||||
"GITEA_ACCESS_TOKEN",
|
||||
"docker.gitea.com/gitea-mcp-server"
|
||||
],
|
||||
"env": {
|
||||
"GITEA_HOST": "--host http://172.16.94.26",
|
||||
"GITEA_ACCESS_TOKEN": "${input:gitea_token}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### MCP Server使用注意事项
|
||||
|
||||
* Copilot,简要文字描述,不要上太多图,可以提供官方配置链接
|
||||
* Cursor
|
||||
* Continue
|
||||
* ...
|
||||
Reference in New Issue
Block a user