Compare commits

..

123 Commits
dev ... master

Author SHA1 Message Date
wenjiankun 74f5abf8ef Update babel.config.js 2025-07-16 09:25:52 +08:00
chaol 75be91e396 Delete 2.txt 2025-07-16 09:18:34 +08:00
chaol b3ca235c4f Delete 123 2025-07-16 09:18:22 +08:00
chaol b6dc75f19b Delete 111 2025-07-16 09:18:10 +08:00
chaol b969952db1 Delete 1.txt 2025-07-16 09:18:02 +08:00
chaol efb97b42e6 Delete 111111 2025-07-16 09:17:47 +08:00
wenjiankun 15185e74dd Delete 文件困 2025-07-16 09:13:39 +08:00
wenjiankun ad4ee3ce6a Add 111111 2025-07-14 19:37:02 +08:00
chaol 5e080f0690 Add 文件困 2025-07-04 11:52:59 +08:00
文建坤 412b78d544
add LICENSE.
Signed-off-by: 文建坤 <15655334+wen-jiankun@user.noreply.gitee.com>
2025-07-04 03:08:36 +00:00
heweixin 5c925eec37 Add 111 2025-07-03 22:09:57 +08:00
chaol ca148c611a Add 25 2025-07-02 15:40:34 +08:00
chaol 2f4841521c Add 123 2025-07-02 15:15:02 +08:00
chaol 23b86900b4 Add 2.txt 2025-07-02 14:53:02 +08:00
chaol 8614e324e0 Add helper.test 2025-07-02 14:34:25 +08:00
chaol 8a2a052814 Add 1.txt 2025-07-02 11:59:02 +08:00
wenjiankun cc2692e853 Update .gitignore 2025-06-20 11:57:28 +08:00
wenjiankun 9af06db5e4 Update .gitignore 2025-06-20 10:10:27 +08:00
wenjiankun e5e0cf3eef Update .gitignore 2025-06-20 09:20:25 +08:00
文建坤 7ef5360d78
update README.md.
Signed-off-by: 文建坤 <15655334+wen-jiankun@user.noreply.gitee.com>
2025-06-12 01:22:09 +00:00
wenjiankun 8ba0f835e8 Update README.md 2025-06-12 09:15:38 +08:00
wenjiankun 8f9d2c1cdd Update babel.config.js 2025-06-12 09:11:50 +08:00
wenjiankun d38ba4f68a Update babel.config.js 2025-06-12 09:04:40 +08:00
wenjiankun 0e81a94901 Update babel.config.js 2025-06-12 09:02:50 +08:00
wenjiankun 3c7deaf29f Update babel.config.js 2025-06-12 08:59:58 +08:00
wenjiankun e359bedda3 Update Dockerfile 2025-06-12 08:57:08 +08:00
文建坤 295016fab1
update README.md.
这是在Gitee上添加的测试内容

Signed-off-by: 文建坤 <15655334+wen-jiankun@user.noreply.gitee.com>
2025-06-12 00:54:39 +00:00
wenjiankun 720a21ec8a Merge pull request '修复' (#4) from fix-feedback-url-encoding into master 2025-06-03 15:20:07 +08:00
wenjiankun bb4b67f533 完成合并并修复反馈管理页面URL编码显示问题 2025-06-03 15:07:43 +08:00
wenjiankun 6629f186a6 完成合并并修复反馈管理页面URL编码显示问题 2025-06-03 15:05:13 +08:00
wenjiankun 88969a0a23 Merge branch 'master' of https://gitlink.org.cn/wenjiankun/gitlink_help_center 2025-06-03 15:03:45 +08:00
wenjiankun 3e223d0fe8 Merge pull request '添加文档目录导航和返回顶部按钮功能' (#3) from chaol/gitlink_help_center:new_feature_navigation into master 2025-06-02 22:11:00 +08:00
chaol ffa4493995 添加文档目录导航和返回顶部按钮功能 2025-06-02 22:10:13 +08:00
wenjiankun 5af5a1046b Merge pull request '新增功能:文档反馈系统' (#2) from doc-feedback into master 2025-06-02 21:19:46 +08:00
wenjiankun 5dd5e7e800 新增功能:文档反馈系统 2025-06-02 20:04:42 +08:00
wenjiankun 0dc2a6d874 修复文档反馈系统的乱码问题 2025-06-02 19:40:54 +08:00
wenjiankun 69b24c896e 尝试修复Footer组件 2025-06-02 19:31:43 +08:00
wenjiankun 02d7491529 新增功能:文档反馈系统 2025-06-02 19:19:46 +08:00
wenjiankun 64f708d5d2 解决合并冲突 2025-06-02 18:49:26 +08:00
wenjiankun dbefd48205 修复: 在构建过程中注释掉不存在的图片引用 2025-06-02 18:45:49 +08:00
wenjiankun 775fc0ebf7 refactor: .devops/未命名项目.yml 2025-06-02 18:37:36 +08:00
wenjiankun 16d2ac07c8 refactor: .devops/未命名项目.yml 2025-06-02 18:34:56 +08:00
wenjiankun 809064082a refactor: .devops/未命名项目.yml 2025-06-02 18:23:42 +08:00
wenjiankun 231e35badd refactor: .devops/未命名项目.yml 2025-06-02 18:21:41 +08:00
wenjiankun 75cb458a84 refactor: .devops/未命名项目.yml 2025-06-02 18:19:13 +08:00
wenjiankun 1ca6d32ea3 完善DevOps引擎文档,修复图片路径问题并补充详细内容 2025-05-30 11:54:18 +08:00
wenjiankun f0db88027f 移除敏感信息文件并更新.gitignore 2025-05-30 11:31:08 +08:00
wenjiankun e710542913 修复文档中的图片路径问题及相关文档更新 2025-05-30 11:21:28 +08:00
xxq250 cd7d95c8e9 feat: .devops/【生产环境】发布更新.yml 2025-03-06 10:09:23 +08:00
xxq250 fddd74e25b Merge pull request '”代码提交““文件管理”“分支管理”issue修改' (#57) from shuaihao/gitlink_help_center:master into master 2025-03-06 09:17:56 +08:00
ganshihao21 a9b1413390 refactor: .devops/未命名项目.yml 2024-06-27 07:01:20 +00:00
ganshihao21 c6ec30d559 feat: .devops/未命名项目.yml 2024-06-27 07:01:17 +00:00
ganshihao e7af9d79a6 2 2024-06-12 08:21:04 +08:00
ganshihao 60a7d9848d 1 2024-06-04 20:58:54 +08:00
shuaihao cd360fc489 feat: .devops/实验一.yml 2024-05-30 12:06:20 +00:00
shuaihao c0323af52f refactor: delete .devops/未命名项目.yml 2024-05-30 12:06:19 +00:00
shuaihao 8093250445 refactor: delete .devops/【生产环境】发布更新.yml 2024-05-30 12:04:35 +00:00
shuaihao 6b4693ec1b refactor: delete .devops/test.yml 2024-05-30 12:04:31 +00:00
shuaihao 39ee9fb4fe refactor: delete .devops/【测试环境】合并请求通过后自动更新.yml 2024-05-30 12:04:28 +00:00
shuaihao f17eb9103f refactor: delete .devops/发布更新.yml 2024-05-30 12:04:12 +00:00
SH fca75e5364 2024-05-30 19:34:44 +08:00
SH 875d8e8825 修改issue 2024-05-30 16:35:43 +08:00
SH ae42afcbe8 issue修改 2024-05-30 16:09:42 +08:00
SH febaceeddb issue更新、 2024-05-30 16:05:23 +08:00
gehusileng b1071b8d19 Delete qqq.txt 2024-05-30 15:05:27 +08:00
ganshihao 047e0e28e9 Merge branch 'master' of https://gitlink.org.cn/shuaihao/gitlink_help_center 2024-05-30 00:03:02 +08:00
ganshihao 7717bd156e 111 2024-05-30 00:02:35 +08:00
ganshihao21 9775d8517c refactor: .devops/未命名项目.yml 2024-05-29 15:58:42 +00:00
ganshihao21 91746a336a refactor: .devops/未命名项目.yml 2024-05-29 15:58:41 +00:00
ganshihao21 f674c5803d Delete 新建 文本文档 (2).txt 2024-05-29 23:56:44 +08:00
ganshihao21 fc3982b346 Delete abc.txt 2024-05-29 23:56:38 +08:00
ganshihao e0c7692ea1 qqq 2024-05-29 23:56:18 +08:00
ganshihao 3e62cf63af 111 2024-05-29 23:31:08 +08:00
ganshihao21 3add18b653 refactor: .devops/未命名项目.yml 2024-05-29 15:22:45 +00:00
ganshihao21 9432db0293 refactor: .devops/未命名项目.yml 2024-05-29 15:14:53 +00:00
ganshihao 19fd1a6865 1 2024-05-29 11:55:17 +08:00
ganshihao21 f37414c02b feat: .devops/未命名项目.yml 2024-05-29 03:46:39 +00:00
Gehusileng c08b824114 增加dockerfile 2024-05-29 11:37:12 +08:00
Gehusileng 20d34b7e8b 增加文件版本管理功能 2024-05-29 11:31:41 +08:00
ganshihao21 6007d962d9 refactor: .devops/未命名项目.yml 2024-05-29 03:19:33 +00:00
ganshihao21 5fdb0d340b refactor: .devops/未命名项目.yml 2024-05-29 03:15:15 +00:00
ganshihao e5d37ccd34 Merge branch 'master' of https://gitlink.org.cn/shuaihao/gitlink_help_center 2024-05-29 10:55:21 +08:00
ganshihao21 8002f6161e Delete abc.txt 2024-05-29 10:55:39 +08:00
ganshihao a5fe3fddca 1111 2024-05-29 10:51:26 +08:00
ganshihao21 d56f6adfe2 refactor: .devops/未命名项目.yml 2024-05-29 02:43:43 +00:00
ganshihao21 0de7116ae0 refactor: .devops/未命名项目.yml 2024-05-29 02:38:57 +00:00
ganshihao21 5081f61f05 refactor: .devops/未命名项目.yml 2024-05-29 02:17:20 +00:00
ganshihao 27ce5c62af 111 2024-05-29 10:11:23 +08:00
ganshihao21 271460860b refactor: .devops/未命名项目.yml 2024-05-29 00:48:43 +00:00
ganshihao21 011f2a84ba refactor: .devops/未命名项目.yml 2024-05-29 00:38:24 +00:00
ganshihao21 7119e96ee7 refactor: .devops/未命名项目.yml 2024-05-29 00:34:38 +00:00
ganshihao21 131a350603 refactor: .devops/未命名项目.yml 2024-05-29 00:29:26 +00:00
ganshihao21 089757d54a feat: .devops/未命名项目.yml 2024-05-29 00:29:20 +00:00
ganshihao21 460d00d8b7 Update Dockerfile 2024-05-29 08:20:07 +08:00
xxq250 eb52bfae5a Merge pull request '"介绍"处缺少部分跳转链接' (#48) from luoyi21a/gitlink_help_center:master into master 2024-05-28 16:15:59 +08:00
xxq250 87d711cc46 Merge pull request '“文件管理”等地方缺少文档解释 的补充' (#46) from Dongjiaqi/gitlink_help_center:master into master 2024-05-28 16:15:39 +08:00
xxq250 171438666c Merge pull request '修复在“通知设置”的文档中图片显示错误' (#43) from SheYuWu03/gitlink_help_center:master into master 2024-05-28 16:12:49 +08:00
E4wel83hu 1a49548848 Update 重睛鸟代码溯源.md 2024-05-28 16:10:32 +08:00
E4wel83hu cfd30d2098 更新用户操作流程图 2024-05-28 16:09:42 +08:00
E4wel83hu 6ca9d53755 Delete static/img/di_san_fang/重晴鸟代码溯源/用户操作流程.png 2024-05-28 16:09:07 +08:00
wuxin21 1c2bfc2df9 refactor: .devops/发布更新.yml 2024-05-28 06:50:33 +00:00
wuxin21 cff83d6414 refactor: .devops/发布更新.yml 2024-05-28 06:50:32 +00:00
wuxin21 bb7a588914 feat: .devops/发布更新.yml 2024-05-27 15:48:35 +00:00
SheYuWu03 2007e6743b refactor: .devops/test.yml 2024-05-27 13:22:54 +00:00
SheYuWu03 8c50638373 feat: .devops/test.yml 2024-05-27 13:19:29 +00:00
SheYuWu03 fe0ed5e2c2 refactor: delete .devops/未命名项目.yml 2024-05-27 13:19:29 +00:00
SheYuWu03 4147bc9881 feat: .devops/未命名项目.yml 2024-05-27 12:42:45 +00:00
luoyi21a 52a2772907 Update intro.md 2024-05-27 15:44:36 +08:00
pzthu8lr3 a28a256aac Update Dockerfile 2024-05-27 15:07:31 +08:00
qinxiaonan_branch 8784a49c47 删除未命名项目 2024-05-27 14:35:22 +08:00
qinxiaonan_branch 006daf7d4d 修复“通知设置”的文档中图片显示错误 2024-05-27 14:31:19 +08:00
pzthu8lr3 f0ae1156c6 ADD file via upload 2024-05-27 14:30:12 +08:00
wuxin21 9d45037685 refactor: .devops/未命名项目.yml 2024-05-27 03:24:58 +00:00
SheYuWu03 6986c0e8b5 refactor: .devops/未命名项目.yml 2024-05-27 03:23:59 +00:00
SheYuWu03 6674748d21 feat: .devops/未命名项目.yml 2024-05-27 03:23:50 +00:00
liushi cd47e47fd7 Merge pull request '更新wiki部分的md文件' (#5) from liuyuyang_branch into master 2024-05-24 00:17:28 +08:00
Dongjiaqi a3eb671abf Merge pull request '帮助中心文档 代码评审' (#4) from dongjiaqi_branch into master 2024-05-24 00:05:36 +08:00
djq fc95f9272e 帮助中心文档 代码评审 2024-05-24 00:02:15 +08:00
liushi ec35e2a27c Merge pull request '帮助中心文档 文件管理 实现' (#3) from dongjiaqi_branch into master 2024-05-23 23:44:34 +08:00
djq 104a2e633c 帮助中心文档 文件管理 部分实现 2024-05-23 23:40:15 +08:00
Dongjiaqi edf2c30fce Merge pull request '分支管理' (#2) from dongjiaqi_branch into master 2024-05-23 23:22:14 +08:00
Dongjiaqi 3154a54b6b Merge pull request '更新组织成员管理.md' (#1) from liuyuyang_branch into master 2024-05-23 23:21:44 +08:00
djq aa00f60189 帮助中心文档-分支管理 2024-05-23 21:02:46 +08:00
148 changed files with 4949 additions and 378 deletions

View File

@ -1,35 +0,0 @@
version: 2
name: 【测试环境】合并请求通过后自动更新
description: 合并请求通过后自动更新
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: pr
ruleset:
- param-ref: merged
operator: EQ
value: "true"
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((hnxjy_test_83.password))
ssh_ip: '"111.8.36.180"'
ssh_port: '"120"'
ssh_user: '"root"'
ssh_cmd: '"cd /root/docusaurus/config/dir/awesometic-docs && git pull"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0

View File

@ -15,7 +15,7 @@ workflow:
build_action: '"build"'
build_args: '""'
install_args: '""'
registry_url: '""'
registry_url: '"https://registry.npmmirror.com/"'
disturl_url: '""'
sass_binary_site_url: '""'
package_management_type: '"yarn"'

62
.devops/实验一.yml Normal file
View File

@ -0,0 +1,62 @@
version: 2
name: 实验一
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((nudt_devops.nudt_devops))
docker_password: ((nudt_devops.nudt_devops))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5"'
image_tag: '"latest"'
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
username: ((ganshihao21.ganshihao21_user))
password: ((ganshihao21.ganshihao21))
remote_url: '"https://gitlink.org.cn/shuaihao/gitlink_help_center.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh_key.ssh_key))
ssh_ip: '"47.96.164.145"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop ghc_group5 && docker rm ghc_group5 && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5:latest
&& docker run -d -p 3000:3000 --name ghc_group5
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5:latest"'
needs:
- docker_image_build_0
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0

View File

@ -0,0 +1,63 @@
version: 2
name: 未命名项目
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: pr
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
username: ((wen.gitlink_username))
password: ((wen.gitlink_passwd))
remote_url: '"https://gitlink.org.cn/wenjiankun/gitlink_help_center.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((wen.aliyun_name))
docker_password: ((wen.aliyun_passwd))
image_name: '"crpi-b9yruhd9zitzsf2p.cn-hangzhou.personal.cr.aliyuncs.com/wenjiankun/group_02"'
image_tag: '"latest"'
registry_address: '"crpi-b9yruhd9zitzsf2p.cn-hangzhou.personal.cr.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((wen.ssh_passwd))
ssh_ip: '"120.27.244.74"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop group_02 || true && docker rm group_02 || true && docker
pull
crpi-b9yruhd9zitzsf2p.cn-hangzhou.personal.cr.aliyuncs.com/wenjiankun/group_02:latest;
docker run -d -p 3000:3000 --name group_02
crpi-b9yruhd9zitzsf2p.cn-hangzhou.personal.cr.aliyuncs.com/wenjiankun/group_02:latest"'
needs:
- docker_image_build_0

3
.gitignore vendored
View File

@ -21,3 +21,6 @@ deploy.sh
npm-debug.log*
yarn-debug.log*
yarn-error.log*
gitee私人令牌.txt
wen
jiankun

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/gitlink_help_center.iml" filepath="$PROJECT_DIR$/.idea/gitlink_help_center.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

1
25 Normal file
View File

@ -0,0 +1 @@
检查是否完成total修复

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM node:18-alpine
LABEL maintainer="yuankaifneg <2894340009@qq.com>"
WORKDIR /gitlink_help_center
COPY ./ /gitlink_help_center/
# 注释掉不存在的图片引用
RUN sed -i 's/!\[vis_workflow_serial\](\/img\/engine\/vis_workflow_serial.png)/<!-- ![vis_workflow_serial](\/img\/engine\/vis_workflow_serial.png) -->/g' docs/DevOps引擎/图形流水线.md && \
sed -i 's/!\[vis_workflow_parallel\](\/img\/engine\/vis_workflow_parallel.png)/<!-- ![vis_workflow_parallel](\/img\/engine\/vis_workflow_parallel.png) -->/g' docs/DevOps引擎/图形流水线.md && \
sed -i 's/!\[vis_workflow_mixed\](\/img\/engine\/vis_workflow_mixed.png)/<!-- ![vis_workflow_mixed](\/img\/engine\/vis_workflow_mixed.png) -->/g' docs/DevOps引擎/图形流水线.md
RUN yarn install
RUN npm run build -- --locale zh-cn
CMD ["npm", "run", "serve"]
# 这是在GitLink上添加的测试注释"

194
LICENSE Normal file
View File

@ -0,0 +1,194 @@
木兰宽松许可证第2版
木兰宽松许可证第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2
您对“软件”的复制、使用、修改及分发受木兰宽松许可证第2版“本许可证”的如下条款的约束
0. 定义
“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
“法人实体” 是指提交贡献的机构及其“关联实体”。
“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是
指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
1. 授予版权许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可
以复制、使用、修改、分发其“贡献”,不论修改与否。
2. 授予专利许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定
撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡
献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软
件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“
关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或
其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权
行动之日终止。
3. 无商标许可
“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可但您为满足第4条规定
的声明义务而必须使用除外。
4. 分发限制
您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“
本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
5. 免责声明与责任限制
“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对
任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于
何种法律理论,即使其曾被建议有此种损失的可能性。
6. 语言
“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文
版为准。
条款结束
如何将木兰宽松许可证第2版应用到您的软件
如果您希望将木兰宽松许可证第2版应用到您的新软件为了方便接收者查阅建议您完成如下三步
1 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
2 请您在软件包的一级目录下创建以“LICENSE”为名的文件将整个许可证文本放入该文件中
3 请将如下声明文本放入每个源文件的头部注释中。
Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan
PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
Mulan Permissive Software LicenseVersion 2
Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2)
January 2020 http://license.coscl.org.cn/MulanPSL2
Your reproduction, use, modification and distribution of the Software shall
be subject to Mulan PSL v2 (this License) with the following terms and
conditions:
0. Definition
Software means the program and related documents which are licensed under
this License and comprise all Contribution(s).
Contribution means the copyrightable work licensed by a particular
Contributor under this License.
Contributor means the Individual or Legal Entity who licenses its
copyrightable work under this License.
Legal Entity means the entity making a Contribution and all its
Affiliates.
Affiliates means entities that control, are controlled by, or are under
common control with the acting entity under this License, control means
direct or indirect ownership of at least fifty percent (50%) of the voting
power, capital or other securities of controlled or commonly controlled
entity.
1. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby
grants to you a perpetual, worldwide, royalty-free, non-exclusive,
irrevocable copyright license to reproduce, use, modify, or distribute its
Contribution, with modification or not.
2. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to you a perpetual, worldwide, royalty-free, non-exclusive,
irrevocable (except for revocation under this Section) patent license to
make, have made, use, offer for sale, sell, import or otherwise transfer its
Contribution, where such patent license is only limited to the patent claims
owned or controlled by such Contributor now or in future which will be
necessarily infringed by its Contribution alone, or by combination of the
Contribution with the Software to which the Contribution was contributed.
The patent license shall not apply to any modification of the Contribution,
and any other combination which includes the Contribution. If you or your
Affiliates directly or indirectly institute patent litigation (including a
cross claim or counterclaim in a litigation) or other patent enforcement
activities against any individual or entity by alleging that the Software or
any Contribution in it infringes patents, then any patent license granted to
you under this License for the Software shall terminate as of the date such
litigation or activity is filed or taken.
3. No Trademark License
No trademark license is granted to use the trade names, trademarks, service
marks, or product names of Contributor, except as required to fulfill notice
requirements in section 4.
4. Distribution Restriction
You may distribute the Software in any medium with or without modification,
whether in source or executable forms, provided that you provide recipients
with a copy of this License and retain copyright, patent, trademark and
disclaimer statements in the Software.
5. Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY
KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR
COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT
LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING
FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO
MATTER HOW ITS CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
6. Language
THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION
AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF
DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION
SHALL PREVAIL.
END OF THE TERMS AND CONDITIONS
How to Apply the Mulan Permissive Software LicenseVersion 2
(Mulan PSL v2) to Your Software
To apply the Mulan PSL v2 to your work, for easy identification by
recipients, you are suggested to complete following three steps:
i. Fill in the blanks in following statement, including insert your software
name, the year of the first publication of your software, and your name
identified as the copyright owner;
ii. Create a file named "LICENSE" which contains the whole context of this
License in the first directory of your software package;
iii. Attach the statement to the appropriate annotated syntax at the
beginning of each source file.
Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan
PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.

View File

@ -1,4 +1,4 @@
# 确实开源帮助中心
# 确实开源帮助中心lc
## 贡献文档方式
#### 1.复刻主仓库
@ -101,7 +101,7 @@
npm run dev
```
这是在Gitee上添加的测试内容
![输入图片说明](versioned_sidebars/9b42004fa60ff7c58e84d562fa529d3.png)

View File

@ -2,6 +2,74 @@
sidebar_label: 'bot安装'
sidebar_position: 1
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var aElements = document.getElementsByTagName('a');
var hzh = ['bot安装','bot安装'];
var hen = ['Bot Installation','Bot Installation'];
var azh = ['跳到主要内容','','帮助中心','','','','','','','','','','','','','','','','','','','','','机器人(Bot)','编辑此页','上一页 bot市场','下一页bot 配置','网站首页','关于我们','教学实践','合作伙伴','API文档','Git常用命令','引擎使用手册','服务协议','官网邮箱gitlink@ccf.org.cn','QQ群','公众号'];
var aen = ['Jump to main content','','Help Center','','','','','','','','','','','','','','','','','','','','','Robot (Bot)','Edit this page','last page Bot market','next page Bot configuration','Website homepage','About Us','Teaching practice','Partners','API documentation','Common Git commands','Engine User Manual','Service Agreement','Official website email: gitlink@ccf.org.cn','QQ group','Official Account'];
var zhtranalate = ['Bot安装是进行bot安装和管理控制的重要模块主要包括bot安装、安装查询、安装管理等功能。','在bot详情页用户点击“安装此Bot”按钮后可以看到该bot工作所需的各项权限信息。若用户同意授予bot所需的相关权限即可进行安装。用户可选择将bot安装到所有仓库用户拥有的所有仓库也可以选择指定的仓库进行安装。','','在个人“设置”或者“仓库设置”中用户可以看到目前已经安装的Bot情况点击“配置”按钮可以对bot安装情况进行配置点击“卸载”按钮可以进行卸载。','','在bot安装配置页中用户可以掌握该bot的安装位置和工作状态。若用户需要更改bot的工作仓库时可以进行更改安装位置。bot的工作状态包括激活和挂起用户可根据需要对bot的状态进行调整将其挂起或者激活会影响到bot对仓库数据的访问权限。','','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot installation is an important module for bot installation and management control, which mainly includes functions such as bot installation, installation queries, and installation management.','On the bot details page, after clicking the "Install this bot" button, users can see the necessary permission information for the bot to work. If the user agrees to grant the necessary permissions to the bot, installation can proceed. Users can choose to install the bot in all warehouses (all warehouses owned by the user) or select a specified warehouse for installation.','','In personal "settings" or "warehouse settings", users can see the current installation status of bots. Click the "configure" button to configure the bot installation status, and click the "uninstall" button to uninstall.','','In the bot installation configuration page, users can grasp the installation location and working status of the bot. If the user needs to change the workspace of the bot, they can change the installation location. The working status of bots includes activation and suspension. Users can adjust the status of bots as needed. Suspending or activating bots can affect their access to warehouse data.','','© Copyright 2024 CCF Open Source Development Committee','Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
if (aElements[0].innerText == azh[0]){
for (var i = 0; i < aElements.length; i++) {
if (aElements[i].innerText != ''){
if (i < aElements.length){
aElements[i].innerText = aen[i];
}
}
}
}
else{
for (var i = 0; i < aElements.length; i++) {
if (aElements[i].innerText != ''){
if (i < aElements.length){
aElements[i].innerText = azh[i];
}
}
}
}
}}>中/英</MyButton>
# bot安装

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot市场'
sidebar_position: 4
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot市场','bot市场'];
var hen = ['Bot Market','Bot Market'];
var zhtranalate = ['Bot市场是进行Bot分享与复用的重要模块主要包括bot的搜索发现详情查看等功能。','Bot市场主页中展示了目前所有已经上架市场的bot简要信息包括bot的头像名称开发者简介和安装次数等信息用户可根据这些基本信息初步判断该bot是否符合自己的项目需求。','在bot市场主页中用户可以选择指定的bot种类筛选出特定分类的bot在这个种类范围内进行搜索与选择。','此外用户通过在搜索栏中输入关键字进行搜索可检索出内容包含指定关键字的相关bot。','用户可结合种类筛选和关键字搜索缩小范围在市场中快速找到符合项目相关需求的bot。','','在bot市场页中用户点击指定的bot卡片即可进入该bot的详情页。Bot的详情页包含bot的头像名称开发者种类和详细介绍等信息用户可在此掌握该bot的各项介绍进一步判断是否将其安装到指定仓库中。','','在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。','去市场看看吧!','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['The bot market is an important module for sharing and reusing bots, mainly including functions such as searching, discovering, and viewing details of bots.' , 'The Bot Market homepage displays brief information about all bots that have been put on the market, including their avatars, names, developers, introductions, and installation times. Users can use this basic information to preliminarily determine whether the bot meets their project requirements.' , 'On the bot market homepage, users can select a specific type of bot, filter out specific categories of bots, and search and select within this category range.' , 'In addition, users can search for relevant bots containing specified keywords by entering keywords in the search bar.' , 'Users can combine category filtering and keyword search to narrow down the scope and quickly find bots that meet project related needs in the market.' , '' , 'In the bot market page, users can click on the specified bot card to enter the details page of the bot. The details page of the bot includes information such as the bot avatar, name, developer, type, and detailed introduction. Users can grasp the various introductions of the bot here and further determine whether to install it in the designated warehouse.' , '' , 'In the bot details page, if users believe that the bot meets their project requirements, they can click the "Install this bot" button to learn about the bots permission information and install it in the designated warehouse. For more information on installation, please refer to the "Bot Installation" section' , 'Go take a look at the market!' , '©Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trustie& IntelliDE 京ICP备13000930号'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot市场
@ -21,4 +67,16 @@ Bot市场主页中展示了目前所有已经上架市场的bot简要信息
![botmarket2](../../static/img/bot/botmarket2.png)
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。
去市场看看吧!
<MyButton onClick={() => {
location.href = "https://www.gitlink.org.cn/softbot";
}}>Bot市场</MyButton>

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot开发'
sidebar_position: 3
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot开发','bot开发'];
var hen = ['Bot Development','Bot Development'];
var zhtranalate = ['Bot开发是开发者进行bot注册的重要模块。' , '在个人“设置”中用户可以看到目前已经注册的bot列表点击对应bot的“编辑”按钮可以对已注册的bot进行配置点击“Bot注册”按钮开始注册新的bot。' , '' , '在注册页中开发者需要填写bot注册的相关信息包括bot的名称、Webhook 地址详细介绍等系统将对开发者输入的信息进行合法性校验确保bot各项信息的完整性和有效性。此外系统将自动生成bot的唯一标识同时调用 GitLink 平台的相关接口生成bot的身份凭证信息包括客户端密钥和私钥等。' , '开发者需通过这些身份信息结合平台接口进行bot身份认证后调用相关接口完成bot的相关功能。' , '平台开发API链接待完善https://www.gitlink.org.cn/docs/api#introduction' , '' , '' , '©Copyright 2024 CCF 开源发展委员会' , 'Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot development is an important module for developers to register their bots.' , 'In personal settings, users can see a list of registered bots and click the "Edit" button on the corresponding bot to configure the registered bots; Click the "Bot Registration" button to start registering a new bot.' , '' , 'In the registration page, developers need to fill in the relevant information for bot registration, including the name of the bot, Webhook address, detailed introduction, etc. The system will verify the legality of the information entered by the developer to ensure the completeness and validity of all bot information. In addition, the system will automatically generate a unique identifier for the bot, and call the relevant interfaces of the GitLink platform to generate the identity credential information of the bot, including the client key and private key.' , 'Developers need to use these identity information in combination with the platform interface for bot identity authentication, and then call the relevant interface to complete the relevant functions of the bot.' , 'Platform development API link (to be improved): https://www.gitlink.org.cn/docs/api#introduction' , '' , '' , '© Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot开发

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot配置'
sidebar_position: 2
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot配置','bot配置'];
var hen = ['Bot Configure','Bot Configure'];
var zhtranalate = ['Bot配置是开发者进行bot维护和配置的重要模块主要包括bot基本信息维护、权限&订阅事件管理、高级选项配置等功能。','Bot的基本信息维护中开发者可以看到bot的各项基本信息并可以根据需要对bot的头像名称Webhook地址等进行修改。','','Bot的权限&订阅事件管理中开发者可根据对仓库资源的访问需要为bot分配不同的权限和等级比如增加代码库权限将拉取请求的写权限变为读权限等。开发者还能更改当前bot订阅的事件列表比如订阅代码库推送取消拉取请求分配订阅等以实现bot功能的更新与升级。','','Bot高级选项配置中开发者可以改变bot的公私有状态从而影响到bot的使用范围。需要注意的是公开状态下的bot在已有其他仓库安装的情况下不能变成私有。开发者可选择将bot上架到市场需要填写上架信息包括市场简介主要功能次要功能等各项信息。','开发者还能进行bot的删除和转让操作发起转让意味着更改bot的所有权需要输入接受者的用户名。在接受者确定接受后即可完成bot的所有权变更拒绝则会取消本次的转让操作。','','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot configuration is an important module for developers to maintain and configure bots, mainly including basic bot information maintenance, permission&subscription event management, advanced option configuration, and other functions.' , 'In the basic information maintenance of bots, developers can see various basic information of bots and modify their avatars, names, Webhook addresses, etc. as needed.' , '' , 'In the permission and subscription event management of bots, developers can assign different permissions and levels to bots based on their access needs to warehouse resources, such as adding code library permissions, changing write permissions for pull requests to read permissions, etc. Developers can also modify the event list of the current bot subscription, such as subscribing to code library push notifications, canceling pull request allocation subscriptions, etc., to achieve updates and upgrades of bot functionality.' , '' , 'In the advanced options configuration of bots, developers can change the public and private status of bots, thereby affecting their usage scope. It should be noted that bots in public status cannot become private when installed in other warehouses. Developers can choose to put their bots on the market and need to fill in the listing information, including market introduction, main functions, secondary functions, and other related information.' , 'Developers can also perform bot deletion and transfer operations, initiating transfer means changing the ownership of the bot, and the recipients username needs to be entered. After the recipient confirms acceptance, the ownership change of the bot can be completed. Refusal will cancel the transfer operation.' , '' , '© Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot配置

View File

@ -0,0 +1,13 @@
import React from 'react';
import styles from './mybutton.module.css'; // 假设你有一个CSS模块文件来定义样式
const MyButton = ({ onClick, children, className = '' }) => (
<button
onClick={onClick}
className={`${styles.myButton} ${className}`} // 使用CSS模块样式
>
{children}
</button>
);
export default MyButton;

View File

@ -0,0 +1,21 @@
.myButton {
background-color: #30a834; /* Green */
border: none;
color: #fff; /* 改为白色或其他与绿色背景对比明显的颜色 */
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
position: absolute;
right: 0;
/* 还可以添加其他样式,比如过渡效果、阴影等 */
transition: background-color 0.3s ease; /* 背景色变化的过渡效果 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 简单的阴影效果 */
}
.myButton:hover {
background-color: #288f2c; /* 鼠标悬停时改变背景色 */
}

View File

@ -5,8 +5,323 @@ sidebar_position: 5
# 代码流水线
可以通过代码的形式(YAML格式)来配置流水线,首先选择代码流水线和对应的分支:
![code_workflow1](../../static/img/engine/code_workflow1.jpg)
![code_workflow1](/img/engine/code_workflow1.jpg)
编辑流水线代码,其流水线名称描述、触发器、全局参数、执行串行/并发和流水线编排等概念同图形流水线,具体描述如下:
![code_workflow2](../../static/img/engine/code_workflow2.png)
![code_workflow2](/img/engine/code_workflow2.png)
## YAML格式详解
代码流水线使用YAML格式配置基本结构包括以下几个主要部分
### 1. 基本信息
```yaml
name: "Java应用构建部署流水线" # 流水线名称
description: "用于构建和部署Java应用的CI/CD流水线" # 流水线描述
```
### 2. 触发器配置
```yaml
trigger:
# 代码事件触发器
type: GitLink_Webhook
events:
- push # 推送代码时触发
- pull_request # 创建合并请求时触发
- tag # 创建标签时触发
branches:
- master # 仅在master分支上触发
- release/* # 支持通配符匹配release开头的分支
# 或者使用定时触发器
# type: cron
# expression: "0 0 * * *" # 每天零点触发使用标准cron表达式
```
### 3. 全局参数
```yaml
parameters:
- name: VERSION # 参数名
type: string # 参数类型string, number, boolean
value: "1.0.0" # 默认值
description: "应用版本号" # 参数描述
- name: DEBUG_MODE
type: boolean
value: false
description: "是否开启调试模式"
- name: MAX_MEMORY
type: number
value: 1024
description: "最大内存配置(MB)"
```
### 4. 并发执行设置
```yaml
concurrent:
enabled: true # 是否允许并发执行
max: 3 # 最大并发数
```
### 5. 作业和步骤定义
```yaml
jobs:
build: # 作业ID
name: "构建应用" # 作业名称
steps: # 步骤列表
- name: "检出代码" # 步骤名称
uses: checkout@v1 # 使用的动作
- name: "编译构建"
uses: shell@v1
with: # 步骤参数
script: |
echo "开始构建项目"
mvn clean package -DskipTests
- name: "运行测试"
uses: shell@v1
with:
script: "mvn test"
deploy: # 另一个作业
name: "部署应用"
needs: build # 依赖前一个作业完成
steps:
- name: "部署到服务器"
uses: deploy@v1
with:
target: production
artifacts: target/*.jar
```
## 完整示例
下面是一个完整的Java应用CI/CD流水线示例
```yaml
name: "Java应用CI/CD流水线"
description: "构建、测试和部署Java应用"
trigger:
type: GitLink_Webhook
events:
- push
- pull_request
branches:
- master
- develop
parameters:
- name: JAVA_VERSION
type: string
value: "11"
- name: SKIP_TESTS
type: boolean
value: false
- name: DEPLOY_ENV
type: string
value: "test"
description: "部署环境(test/staging/production)"
concurrent:
enabled: true
max: 2
jobs:
build:
name: "构建和测试"
steps:
- name: "检出代码"
uses: checkout@v1
- name: "设置Java环境"
uses: setup-java@v1
with:
java-version: ${JAVA_VERSION}
- name: "缓存Maven依赖"
uses: cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- name: "编译构建"
uses: shell@v1
with:
script: |
echo "开始构建项目"
if [ "${SKIP_TESTS}" = "true" ]; then
mvn clean package -DskipTests
else
mvn clean package
fi
- name: "代码质量检查"
uses: sonarqube@v1
with:
host: ${secrets.SONAR_HOST}
token: ${secrets.SONAR_TOKEN}
- name: "构建Docker镜像"
uses: shell@v1
with:
script: |
docker build -t myapp:${GITLINK_COMMIT_SHA} .
docker tag myapp:${GITLINK_COMMIT_SHA} myregistry/myapp:latest
- name: "推送Docker镜像"
uses: shell@v1
with:
script: |
echo ${secrets.DOCKER_PASSWORD} | docker login -u ${secrets.DOCKER_USERNAME} --password-stdin
docker push myregistry/myapp:latest
deploy:
name: "部署应用"
needs: build
steps:
- name: "部署到环境"
uses: deploy@v1
with:
environment: ${DEPLOY_ENV}
credentials: ${secrets.SSH_KEY}
script: |
ssh ${secrets.SERVER_HOST} "cd /app && docker-compose pull && docker-compose up -d"
- name: "健康检查"
uses: shell@v1
with:
script: |
for i in {1..30}; do
if curl -s http://${secrets.SERVER_HOST}:8080/health | grep -q "UP"; then
echo "服务已成功启动"
exit 0
fi
echo "等待服务启动... $i/30"
sleep 10
done
echo "服务启动超时"
exit 1
- name: "发送通知"
uses: notification@v1
with:
type: email
recipients: team@example.com
subject: "部署完成通知"
message: "应用已成功部署到${DEPLOY_ENV}环境"
```
## 常用节点类型及配置
### 检出代码
```yaml
- name: "检出代码"
uses: checkout@v1
with:
repository: owner/repo # 可选,默认为当前仓库
ref: master # 可选分支、标签或提交ID
depth: 1 # 可选git历史深度
```
### 执行Shell命令
```yaml
- name: "执行Shell命令"
uses: shell@v1
with:
script: |
echo "执行多行Shell命令"
ls -la
mkdir -p build
working-directory: ./src # 可选,指定工作目录
timeout: 300 # 可选,超时时间(秒)
```
### 构建应用
```yaml
- name: "构建Java应用"
uses: build@v1
with:
type: maven # 构建类型maven, gradle, npm等
command: "clean package" # 构建命令
jdk-version: "11" # JDK版本
```
### 部署应用
```yaml
- name: "部署到服务器"
uses: deploy@v1
with:
type: ssh # 部署类型ssh, kubernetes, docker等
host: ${secrets.SERVER_HOST}
credentials: ${secrets.SSH_KEY}
source: target/*.jar
destination: /app/
post-deploy: "systemctl restart myapp"
```
### 条件执行
```yaml
- name: "仅在生产环境执行"
if: ${DEPLOY_ENV} == 'production'
uses: shell@v1
with:
script: "echo '执行生产环境特定操作'"
```
## 变量引用
在YAML配置中可以通过以下方式引用变量
1. **参数变量**:使用`${参数名}`格式引用
```yaml
script: "mvn -Dversion=${VERSION} package"
```
2. **环境变量**:使用`${env.变量名}`格式引用
```yaml
script: "echo ${env.PATH}"
```
3. **密钥变量**:使用`${secrets.密钥名}`格式引用
```yaml
credentials: ${secrets.API_TOKEN}
```
4. **内置变量**GitLink提供的内置变量
```yaml
# 提交相关
${GITLINK_COMMIT_SHA} # 当前提交的SHA
${GITLINK_BRANCH_NAME} # 当前分支名称
# 仓库相关
${GITLINK_REPO_NAME} # 仓库名称
${GITLINK_REPO_OWNER} # 仓库所有者
# 流水线相关
${GITLINK_WORKFLOW_ID} # 流水线ID
${GITLINK_RUN_ID} # 执行ID
```
## 最佳实践
1. **版本控制**:将流水线配置文件提交到代码仓库,与应用代码一起版本控制
2. **模块化**:将复杂流水线拆分为多个作业,便于维护和复用
3. **参数化**:使用参数使流水线更灵活,适应不同场景
4. **密钥管理**:敏感信息使用密钥管理,避免硬编码
5. **注释**:添加适当注释,提高可读性
6. **错误处理**:添加适当的错误处理和重试机制
7. **通知机制**:配置通知,及时了解流水线执行状态

View File

@ -3,13 +3,179 @@ sidebar_label: '参数配置'
sidebar_position: 2
---
# 参数配置
# 参数配置
可在流水线中使用,实现动态参数配置;有字符串、数字、布尔三种类型。
可在流水线中使用,实现动态参数配置;有字符串、数字、布尔三种类型。
![parameter1](../../static/img/engine/parameter1.png)
![parameter1](/img/engine/parameter1.png)
在流水线的配置中通过如下方式获取参数:
![parameter2](../../static/img/engine/parameter2.png)
![parameter2](/img/engine/parameter2.png)
## 参数类型详解
GitLink DevOps引擎支持三种类型的参数可以根据不同需求选择合适的类型
### 1. 字符串参数 (String)
字符串参数用于存储文本值,如版本号、环境名称、分支名等。
**特点**
- 可以包含任意文本内容
- 支持空字符串
- 最大长度为2000个字符
**使用场景**
- 指定版本号:`1.0.0`
- 环境名称:`production`
- 配置文件路径:`/config/app.properties`
**示例**
```yaml
parameters:
- name: VERSION
type: string
value: "1.0.0"
description: "应用版本号"
```
### 2. 数字参数 (Number)
数字参数用于存储整数或浮点数值,如端口号、超时时间、内存大小等。
**特点**
- 支持整数和浮点数
- 可以进行数学运算
- 范围限制:-2^53 到 2^53
**使用场景**
- 端口号:`8080`
- 超时时间:`300`(秒)
- 内存限制:`1024`MB
**示例**
```yaml
parameters:
- name: PORT
type: number
value: 8080
description: "应用端口号"
```
### 3. 布尔参数 (Boolean)
布尔参数用于表示是/否选项,如开关功能、跳过步骤等。
**特点**
- 只有两个可能值:`true` 或 `false`
- 用于条件判断
**使用场景**
- 是否跳过测试:`true`/`false`
- 是否启用调试模式:`true`/`false`
- 是否发送通知:`true`/`false`
**示例**
```yaml
parameters:
- name: SKIP_TESTS
type: boolean
value: false
description: "是否跳过测试"
```
## 参数使用方法
### 在图形流水线中使用参数
在图形流水线的节点配置中,可以通过以下方式引用参数:
1. **Shell节点**:在脚本中使用`${参数名}`格式引用
```bash
echo "当前版本: ${VERSION}"
if [ "${SKIP_TESTS}" = "true" ]; then
echo "跳过测试"
else
echo "运行测试"
fi
```
2. **构建节点**:在构建参数中引用
```
-Dversion=${VERSION} -DskipTests=${SKIP_TESTS}
```
3. **部署节点**:在部署配置中引用
```
目标环境: ${ENVIRONMENT}
部署端口: ${PORT}
```
### 在代码流水线中使用参数
在YAML配置的代码流水线中可以在任何需要的地方引用参数
```yaml
jobs:
build:
steps:
- name: "编译构建"
uses: shell@v1
with:
script: |
echo "构建版本: ${VERSION}"
mvn clean package -Dversion=${VERSION} -DskipTests=${SKIP_TESTS}
- name: "条件步骤"
if: ${DEBUG_MODE} == true
uses: shell@v1
with:
script: "echo '调试模式已启用'"
```
## 参数作用域
参数的作用域决定了它们在哪些地方可以被访问和使用:
1. **全局参数**:在参数配置页面定义的参数,可在整个流水线中使用
2. **作业参数**:在特定作业中定义的参数,仅在该作业及其步骤中可用
3. **步骤参数**:在特定步骤中定义的参数,仅在该步骤中可用
## 参数优先级
当存在同名参数时,遵循以下优先级规则(从高到低):
1. 步骤参数
2. 作业参数
3. 全局参数
4. 默认值
## 参数最佳实践
### 命名规范
- 使用大写字母和下划线:`VERSION`、`API_TOKEN`、`MAX_RETRY_COUNT`
- 名称应清晰表达参数用途
- 避免使用特殊字符和空格
### 提供默认值
- 始终为参数提供合理的默认值
- 默认值应确保流水线在不指定参数时也能正常运行
### 添加描述
- 为每个参数添加清晰的描述
- 说明参数的用途、可选值和影响
### 参数分组
- 相关参数应使用一致的前缀,如`DB_HOST`、`DB_PORT`、`DB_USER`
- 便于理解和管理
### 敏感信息处理
- 不要在参数中存储敏感信息(如密码、令牌)
- 敏感信息应使用密钥管理功能

View File

@ -9,42 +9,126 @@ sidebar_position: 4
同一仓库下的流水线名称不能重复
![vis_workflow1](../../static/img/engine/vis_workflow1.png)
![vis_workflow1](/img/engine/vis_workflow1.png)
## 触发器
注:流水线编排时,触发器要放在开始节点之前;目前一条流水线仅添加支持一个触发器
* 定时触发器cron可通过填写cron表达式设置触发的具体时间
![vis_workflow2](../../static/img/engine/vis_workflow2.png)
![vis_workflow2](/img/engine/vis_workflow2.png)
* 事件触发器GitLink_Webhook给出了常见的代码变更事件触发包括推送代码、合并请求、创建标签
![vis_workflow3](../../static/img/engine/vis_workflow3.png)
![vis_workflow3](/img/engine/vis_workflow3.png)
## 全局参数
添加后可在当前流水线中使用
![vis_workflow4](../../static/img/engine/vis_workflow4.png)
![vis_workflow4](/img/engine/vis_workflow4.png)
使用实例
![vis_workflow5](../../static/img/engine/vis_workflow5.png)
![vis_workflow5](/img/engine/vis_workflow5.png)
## 并发执行
![vis_workflow6](../../static/img/engine/vis_workflow6.png)
![vis_workflow6](/img/engine/vis_workflow6.png)
开启后同一流水线可同时并发执行n个流水线实例每触发一次我们得到一个流水线实例
![vis_workflow7](../../static/img/engine/vis_workflow7.png)
![vis_workflow7](/img/engine/vis_workflow7.png)
若未开启则当前流水线实例执行中后面的实例处于排队状态最多可排队5个实例。当前实例执行完成下一个实例开始执行。
![vis_workflow8](../../static/img/engine/vis_workflow8.png)
![vis_workflow8](/img/engine/vis_workflow8.png)
## 流水线编排
每条流水线必须要有一个开始节点、结束节点,至少一个任务节点。支持串行编排和并行编排。
### 串行编排
串行编排是指流水线中的任务按顺序一个接一个执行,当前任务完成后,下一个任务才会开始。这是最基本的流水线执行方式,适合有明确依赖关系的任务。
<!-- ![vis_workflow_serial](/img/engine/vis_workflow_serial.png) -->
**如何创建串行流水线**
1. 在流水线编辑界面,点击左侧工具栏中的"开始"节点,拖拽到画布上
2. 添加任务节点如Shell、构建、部署等
3. 使用连接线将节点按顺序连接起来
4. 最后添加"结束"节点并连接
**串行编排的优点**
- 执行逻辑清晰,易于理解
- 每个步骤都依赖于前一步骤的成功完成
- 便于调试和故障排除
**串行编排的缺点**
- 执行效率较低,总执行时间为所有任务执行时间之和
- 一个节点失败会导致整个流水线停止
### 并行编排
并行编排允许多个任务同时执行,适用于相互独立的任务,可以显著提高流水线的执行效率。
<!-- ![vis_workflow_parallel](/img/engine/vis_workflow_parallel.png) -->
**如何创建并行流水线**
1. 在流水线编辑界面创建开始节点
2. 从开始节点连接到多个任务节点,形成分支
3. 使用"汇合"节点将多个并行分支合并
4. 连接到结束节点完成流水线
**并行编排的优点**
- 提高执行效率,减少总执行时间
- 充分利用系统资源
- 适合执行相互独立的任务
**并行编排的缺点**
- 增加流水线复杂度
- 可能导致资源竞争
- 需要注意并行任务间的数据共享问题
### 混合编排
在实际应用中,通常会结合使用串行和并行编排,根据任务的依赖关系灵活设计流水线结构。
<!-- ![vis_workflow_mixed](/img/engine/vis_workflow_mixed.png) -->
**混合编排示例**
1. 代码检出(串行)
2. 并行执行单元测试和代码质量检查
3. 构建应用(串行,依赖前两步完成)
4. 并行部署到多个环境
### 常用节点类型
GitLink DevOps引擎提供多种预定义节点类型满足不同场景需求
#### 基础节点
- **开始节点**:流水线的起点
- **结束节点**:流水线的终点
- **汇合节点**:合并多个并行分支
#### 任务节点
- **Shell节点**执行Shell命令或脚本
- **构建节点**:编译和构建项目
- **部署节点**:将应用部署到目标环境
- **测试节点**:执行自动化测试
- **通知节点**:发送邮件或其他通知
#### 控制节点
- **条件节点**:根据条件决定执行路径
- **循环节点**:重复执行特定任务
- **等待节点**:暂停流水线直到满足条件
### 节点配置最佳实践
1. **命名规范**:使用描述性名称,如"编译Java项目"而非简单的"编译"
2. **超时设置**:为长时间运行的节点设置合理的超时时间
3. **错误处理**:配置节点失败时的处理策略(继续/中止)
4. **资源限制**根据任务需求合理设置CPU和内存限制
5. **日志管理**:配置重要日志的保存策略

View File

@ -3,14 +3,200 @@ sidebar_label: '密钥设置'
sidebar_position: 3
---
# 密钥设置
# 密钥设置
将账号密码、密钥、证书等存放到密钥管理里,配置后可直接在流水线中使用,避免因直接填写引起的泄露风险。
![secret1](../../static/img/engine/secret1.png)
![secret1](/img/engine/secret1.png)
使用示例
注:节点输入参数中,下拉选项为密钥类型,需要提前配置好密钥在流水线中选择使用
![secret2](../../static/img/engine/secret2.png)
![secret2](/img/engine/secret2.png)
## 密钥类型
GitLink DevOps引擎支持多种类型的密钥以满足不同的安全需求
### 1. 用户名密码
用于存储需要用户名和密码的凭证,如数据库连接、应用登录等。
**配置字段**
- 密钥名称:唯一标识符
- 用户名:登录账号
- 密码:登录密码
- 描述:可选的说明文字
**使用场景**
- 数据库连接
- 应用系统登录
- API认证
**流水线中引用方式**
```yaml
# 在代码流水线中引用
with:
username: ${secrets.DB_CREDENTIAL.username}
password: ${secrets.DB_CREDENTIAL.password}
# 在Shell脚本中引用
echo "连接数据库..."
mysql -u${secrets.DB_CREDENTIAL.username} -p${secrets.DB_CREDENTIAL.password} -h localhost
```
### 2. SSH密钥
用于SSH连接远程服务器支持公钥/私钥认证方式。
**配置字段**
- 密钥名称:唯一标识符
- 私钥SSH私钥内容
- 密码短语:私钥的密码(如有)
- 描述:可选的说明文字
**使用场景**
- 远程服务器部署
- Git仓库访问
- 自动化运维操作
**流水线中引用方式**
```yaml
# 在代码流水线中引用
with:
type: ssh
credentials: ${secrets.SERVER_SSH_KEY}
host: example.com
# 使用SSH密钥部署
- name: "部署到服务器"
uses: deploy@v1
with:
type: ssh
credentials: ${secrets.SERVER_SSH_KEY}
host: ${SERVER_HOST}
script: |
cd /app
./deploy.sh
```
### 3. 访问令牌
用于API访问的令牌如GitHub Token、OAuth令牌等。
**配置字段**
- 密钥名称:唯一标识符
- 令牌值:访问令牌字符串
- 描述:可选的说明文字
**使用场景**
- API认证
- 第三方服务集成
- 容器仓库访问
**流水线中引用方式**
```yaml
# 在代码流水线中引用
with:
token: ${secrets.API_TOKEN}
# 在Shell脚本中使用
curl -H "Authorization: Bearer ${secrets.API_TOKEN}" https://api.example.com/data
```
### 4. 证书
用于存储SSL证书、签名证书等。
**配置字段**
- 密钥名称:唯一标识符
- 证书内容PEM格式的证书
- 私钥:对应的私钥
- 描述:可选的说明文字
**使用场景**
- HTTPS配置
- 应用签名
- 身份认证
**流水线中引用方式**
```yaml
# 在代码流水线中引用
with:
certificate: ${secrets.SSL_CERT.certificate}
private_key: ${secrets.SSL_CERT.private_key}
```
## 密钥权限管理
GitLink DevOps引擎提供细粒度的密钥权限管理确保敏感信息的安全
### 密钥作用域
1. **仓库级别**:仅在特定代码仓库的流水线中可用
2. **组织级别**:在组织内的所有代码仓库流水线中可用
3. **用户级别**:仅对特定用户可见和使用
### 访问控制
1. **创建者**:默认情况下,只有密钥创建者可以查看和编辑密钥
2. **共享**:可以与特定用户或组织共享密钥,并设置只读或读写权限
3. **审计**:所有密钥的使用都会被记录,便于安全审计
## 密钥使用最佳实践
### 安全性建议
1. **定期轮换**:定期更新密钥内容,尤其是高敏感度的密钥
2. **最小权限**:为密钥配置最小必要的权限
3. **避免硬编码**:永远不要在脚本或配置文件中硬编码密钥
4. **加密传输**确保密钥在传输过程中使用TLS/SSL加密
### 命名规范
1. **描述性名称**:使用清晰描述性的名称,如`PROD_DB_CREDENTIAL`而非简单的`DB_CRED`
2. **环境前缀**:使用环境前缀区分不同环境的密钥,如`DEV_`、`TEST_`、`PROD_`
3. **一致性**:保持命名风格一致,推荐使用大写字母和下划线
### 密钥组织
1. **按环境分组**:为不同环境(开发、测试、生产)创建不同的密钥
2. **按用途分组**按照用途数据库、API、部署等组织密钥
3. **文档记录**:维护密钥清单文档,记录用途、权限和有效期
## 密钥轮换流程
为确保系统安全,应定期轮换密钥:
1. **创建新密钥**:创建新版本的密钥,但不立即启用
2. **更新系统**:更新使用该密钥的外部系统
3. **更新流水线**:更新流水线配置,使用新密钥
4. **验证**:验证所有系统和流水线正常工作
5. **废弃旧密钥**:确认无问题后,删除或禁用旧密钥
## 常见问题排查
### 密钥访问被拒绝
**可能原因**
- 权限不足
- 密钥已过期
- 密钥名称错误
**解决方法**
- 检查密钥权限设置
- 验证密钥是否有效
- 确认密钥名称拼写正确
### 密钥内容不正确
**可能原因**
- 格式错误(如多余的换行符、空格)
- 编码问题
- 复制粘贴错误
**解决方法**
- 重新生成并配置密钥
- 确保使用正确的格式和编码
- 使用密钥测试功能验证

View File

@ -0,0 +1,192 @@
---
sidebar_label: '常见问题排查'
sidebar_position: 8
---
# 常见问题排查
本文档汇总了使用GitLink DevOps引擎时可能遇到的常见问题及解决方案。
## 流水线触发问题
### 问题:流水线没有自动触发
**可能原因**
1. Webhook配置不正确
2. 触发条件不匹配
3. 分支名称不匹配
**解决方法**
1. 检查项目设置中的Webhook配置是否正确
2. 确认触发事件如push、pull request等是否与配置一致
3. 检查触发器配置中的分支规则是否匹配
### 问题:流水线重复触发
**可能原因**
1. 多个触发器配置重叠
2. Webhook重复注册
**解决方法**
1. 检查并简化触发器配置,避免重叠
2. 在项目设置中检查并删除重复的Webhook
## 执行失败问题
### 问题:节点执行超时
**可能原因**
1. 任务执行时间超过默认超时时间
2. 资源不足导致执行缓慢
3. 死循环或无限等待
**解决方法**
1. 在节点配置中增加超时时间
2. 优化任务脚本,减少执行时间
3. 检查脚本中是否存在死循环或无限等待情况
### 问题:权限不足导致失败
**可能原因**
1. 执行环境权限不足
2. 密钥配置不正确
3. 外部系统访问受限
**解决方法**
1. 检查并调整执行环境的权限设置
2. 验证密钥配置是否正确
3. 确认外部系统的访问权限和网络连通性
### 问题:构建失败但没有明确错误信息
**可能原因**
1. 日志输出不完整
2. 错误发生在脚本内部
**解决方法**
1. 增加脚本的日志输出
2. 添加错误捕获和输出
3. 在关键步骤添加调试信息
```bash
# 增加错误处理和日志输出的示例
set -e # 任何命令失败立即退出
trap 'echo "发生错误,行号: $LINENO, 命令: $BASH_COMMAND"' ERR
# 增加详细日志
set -x # 打印执行的每条命令
```
## 参数和密钥问题
### 问题:参数值未正确传递
**可能原因**
1. 参数引用语法不正确
2. 参数名称拼写错误
3. 参数作用域问题
**解决方法**
1. 检查参数引用语法是否正确,如`${parameter_name}`
2. 确认参数名称拼写正确
3. 确认参数在正确的作用域中定义
### 问题:密钥无法正常使用
**可能原因**
1. 密钥配置不正确
2. 密钥权限不足
3. 密钥引用方式错误
**解决方法**
1. 在密钥管理页面验证密钥配置
2. 确认密钥具有足够的权限
3. 检查密钥的引用方式,如`${secrets.SECRET_NAME}`
## 性能问题
### 问题:流水线执行缓慢
**可能原因**
1. 资源配置不足
2. 存在性能瓶颈
3. 不必要的串行执行
**解决方法**
1. 增加节点资源配置
2. 识别并优化性能瓶颈
3. 将独立任务改为并行执行
### 问题:资源使用率过高
**可能原因**
1. 资源配置不合理
2. 并发任务过多
3. 存在资源泄漏
**解决方法**
1. 调整资源配置,避免过度分配
2. 限制并发任务数量
3. 检查并修复资源泄漏问题
## 代码流水线语法问题
### 问题YAML语法错误
**可能原因**
1. 缩进不正确
2. 引号使用不当
3. 特殊字符处理不当
**解决方法**
1. 使用YAML验证工具检查语法
2. 确保缩进一致通常是2个空格
3. 对包含特殊字符的字符串使用引号
**常见YAML语法错误示例**
```yaml
# 错误:缩进不一致
jobs:
build:
steps: # 缩进不足
- name: 检出代码
uses: checkout@v1
# 正确:缩进一致
jobs:
build:
steps: # 缩进正确
- name: 检出代码
uses: checkout@v1
```
```yaml
# 错误:特殊字符未使用引号
script: echo Hello World! > output.txt # > 是特殊字符
# 正确:使用引号包裹特殊字符
script: "echo Hello World! > output.txt"
```
## 其他常见问题
### 问题:流水线配置无法保存
**可能原因**
1. 表单验证失败
2. 网络连接问题
3. 服务器错误
**解决方法**
1. 检查表单输入是否符合要求
2. 确认网络连接正常
3. 查看浏览器控制台是否有错误信息
### 问题:流水线执行结果通知未收到
**可能原因**
1. 通知配置不正确
2. 通知服务异常
3. 接收方过滤规则
**解决方法**
1. 检查通知配置是否正确
2. 确认通知服务正常运行
3. 检查接收方的过滤规则
## 联系支持
如果您遇到的问题无法通过上述方法解决请通过以下方式联系GitLink支持团队
1. 在GitLink平台提交疑修(Issue)
2. 发送邮件至support@gitlink.org.cn
3. 通过GitLink官方社区寻求帮助

View File

@ -8,6 +8,6 @@ sidebar_position: 1
引擎(Engine)是GitLink提供的一款DevOps工具通过简单的节点编排来构建开发、测试、部署流水线从而创建自动化的软件交付流程。
它可以实现持续的代码集成,让开发者能尽早发现质量问题,快速定位修复,提升软件开发效率和质量;自动化的代码扫描、编译打包、单元测试,把研发团队从重复的工作中解放出来,聚焦到更有价值的事情上。
![engine_intro](../../static/img/engine/engine_intro.jpg)
![engine_intro](/img/engine/engine_intro.jpg)
在引擎页面中,用户可以创建和编辑图形流水线或代码流水线、设置外部参数、管理密钥等操作。

View File

@ -3,8 +3,159 @@ sidebar_label: '执行记录查询'
sidebar_position: 6
---
# 执行记录查询
# 执行记录查询
用户可以查看流水线的运行状态
用户可以查看流水线的运行状态
![result](../../static/img/engine/result.png)
![result](/img/engine/result.png)
## 执行记录概述
执行记录查询功能允许用户查看、分析和管理流水线的执行情况,帮助用户了解流水线的运行状态、执行历史和性能表现。通过执行记录,用户可以:
- 监控当前正在运行的流水线实例
- 查看历史执行记录和结果
- 分析流水线执行时间和资源消耗
- 排查流水线执行中的问题
- 重新运行或取消流水线实例
## 执行记录列表
执行记录列表页面显示了流水线的所有执行实例,包括以下关键信息:
1. **执行ID**:每次执行的唯一标识符
2. **流水线名称**:关联的流水线名称
3. **触发方式**:如何触发的流水线(手动、代码推送、定时等)
4. **触发用户**:谁触发了这次执行
5. **开始时间**:执行开始的时间
6. **结束时间**:执行结束的时间
7. **执行时长**:从开始到结束的总时长
8. **状态**:当前执行状态(等待中、运行中、成功、失败、取消)
用户可以通过以下条件筛选执行记录:
- 流水线名称
- 执行状态
- 触发方式
- 时间范围
- 触发用户
## 执行详情
点击执行记录列表中的任一记录,可以进入执行详情页面,查看该次执行的详细信息:
### 基本信息
- 执行ID和流水线名称
- 触发信息(触发方式、触发用户、触发时间)
- 执行状态和时间信息
- 关联的代码信息分支、提交ID等
### 执行图
执行图以可视化方式展示流水线的执行过程,包括:
- 节点执行状态(等待中、运行中、成功、失败、跳过)
- 节点执行顺序和依赖关系
- 当前执行位置
- 节点执行时间
### 节点详情
点击执行图中的节点,可以查看该节点的详细信息:
- 节点名称和类型
- 执行状态和时间
- 输入参数和环境变量
- 执行日志
- 输出结果和制品
### 执行日志
执行日志页面显示流水线执行过程中产生的所有日志,帮助用户了解执行过程和排查问题:
- 实时日志流
- 按节点筛选日志
- 日志搜索功能
- 日志下载选项
## 操作功能
在执行记录页面,用户可以对流水线执行实例进行以下操作:
### 重新运行
对于已完成(成功或失败)的执行实例,用户可以选择重新运行:
- **完全重新运行**:从头开始重新执行整个流水线
- **从失败处重新运行**:从上次失败的节点开始重新执行
- **使用相同参数**:使用原执行实例的参数重新运行
- **修改参数后运行**:修改参数后重新运行
### 取消执行
对于正在运行中的执行实例,用户可以选择取消执行:
- **立即取消**:立即停止所有正在运行的节点
- **优雅取消**:等待当前正在运行的节点完成后取消后续节点
### 比较执行
用户可以选择两个执行实例进行比较,了解它们之间的差异:
- 执行时间和性能差异
- 参数和环境差异
- 执行结果差异
- 节点执行状态差异
## 执行统计与分析
执行记录查询功能还提供了统计和分析工具,帮助用户了解流水线的整体表现:
### 执行趋势
- 执行成功率趋势
- 执行时间趋势
- 执行频率趋势
### 性能分析
- 节点执行时间分布
- 资源使用情况
- 瓶颈节点识别
### 故障分析
- 常见失败原因统计
- 失败节点分布
- 失败率最高的节点
## 通知与集成
执行记录查询功能支持与通知系统和其他工具集成:
- **邮件通知**:执行完成后发送结果通知
- **消息推送**:通过企业即时通讯工具推送执行状态
- **状态回调**:向外部系统提供执行状态回调
## 权限控制
执行记录的查看和操作受权限控制:
- **查看权限**:谁可以查看执行记录
- **操作权限**:谁可以重新运行或取消执行
- **管理权限**:谁可以删除或归档执行记录
## 最佳实践
### 执行记录管理
- 定期归档或清理旧的执行记录
- 为重要的执行记录添加标签或说明
- 下载并保存关键执行的日志和结果
### 问题排查
- 从执行日志中查找错误信息
- 比较成功和失败的执行记录
- 检查环境和参数差异
- 分析节点执行时间异常的原因

View File

@ -0,0 +1,123 @@
---
sidebar_label: '流水线最佳实践'
sidebar_position: 7
---
# 流水线最佳实践
## 设计流水线的基本原则
### 1. 保持简单明了
- 每个节点专注于单一任务
- 使用有意义的节点名称
- 添加适当的注释说明节点用途
### 2. 模块化设计
- 将常用功能封装成独立节点
- 合理划分阶段,便于维护和复用
- 使用参数化设计,提高流水线灵活性
### 3. 错误处理
- 添加适当的错误处理机制
- 设置关键节点的超时时间
- 配置失败通知,及时发现问题
## 常见场景的最佳实践
### 持续集成(CI)最佳实践
1. **代码检出**:始终使用特定版本的检出工具
2. **依赖缓存**:缓存依赖包加速构建
3. **并行测试**:将测试分组并行执行
4. **代码质量检查**集成SonarQube等工具
5. **构建制品归档**:保存构建结果便于追溯
示例流水线:
```yaml
name: CI最佳实践
jobs:
build:
steps:
- name: 检出代码
uses: checkout@v1
- name: 缓存依赖
uses: cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- name: 编译构建
uses: shell@v1
with:
script: mvn -B package --file pom.xml
- name: 代码质量检查
uses: sonarqube@v1
with:
host: ${secrets.SONAR_HOST}
token: ${secrets.SONAR_TOKEN}
- name: 归档制品
uses: archive@v1
with:
path: target/*.jar
```
### 持续部署(CD)最佳实践
1. **环境隔离**:严格区分开发、测试、生产环境
2. **蓝绿部署**:减少部署风险
3. **自动化测试**:部署后进行自动化验证
4. **回滚机制**:配置快速回滚方案
5. **部署审批**:关键环境部署前增加人工审批
示例流水线:
```yaml
name: CD最佳实践
jobs:
deploy:
steps:
- name: 部署到测试环境
uses: deploy@v1
with:
target: test
artifacts: app.jar
- name: 自动化测试
uses: shell@v1
with:
script: ./run-tests.sh
- name: 人工审批
uses: approval@v1
with:
approvers: tech-leads
timeout: 24h
- name: 部署到生产环境
uses: deploy@v1
with:
target: production
strategy: blue-green
artifacts: app.jar
- name: 健康检查
uses: shell@v1
with:
script: ./health-check.sh
```
## 性能优化技巧
1. **并行执行**:将独立任务设置为并行执行
2. **资源限制**:合理设置节点资源限制,避免资源浪费
3. **减少依赖**:减少节点间的不必要依赖
4. **缓存利用**:合理使用缓存加速构建
5. **定期清理**:清理旧的构建记录和无用缓存
## 安全最佳实践
1. **密钥管理**:敏感信息使用密钥管理,避免硬编码
2. **最小权限**:为流水线配置最小必要权限
3. **依赖扫描**:集成依赖安全扫描工具
4. **镜像扫描**:部署前扫描容器镜像漏洞
5. **审计日志**:保留完整的流水线执行日志

View File

@ -69,6 +69,25 @@ GitLink确实开源是CCF官方指定的开源创新服务平台旨在
<h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2>
<p>第三方服务使用及设置[3个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/通知/通知简介">
<h2 class="text--truncate cardTitle" title="通知">通知</h2>
<p>通知简介及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/个人主页建站/建站流程">
<h2 class="text--truncate cardTitle" title="个人主页建站">个人主页建站</h2>
<p>个人主页建站使用及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/平台公告">
<h2 class="text--truncate cardTitle" title="平台公告">平台公告</h2>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/服务协议/GitLink服务协议">
<h2 class="text--truncate cardTitle" title="服务协议">服务协议</h2>
<p>GitLink服务协议[1个文档]</p>
</a></article>
</section>
</div>
</div>

View File

@ -1,4 +1,11 @@
---
sidebar_label: '代码提交'
sidebar_position: 3
---
---
### **1. 代码提交入口**
用户可以通过项目代码库中间的文件下的“上传文件”按键来上传文件。
![](../../static/img/代码库管理/代码提交/上传文件入口.png)<br/>
### **2. 上传文件**
进入上传文件页面后,如下图所示,拖动文件,选择提交变更的分支的单击”创建项目“按键即可完成创建。
![](../../static/img/代码库管理/代码提交/上传文件.png)<br/>

View File

@ -1,4 +1,13 @@
---
sidebar_label: '分支管理'
sidebar_position: 5
---
---
### **1. 查看分支**
在代码库栏下,如下图所示,用户可以点击代码库分支从而查看当前项目的所有分支,并且选择对其进行操作。
![](../../static/img/代码库管理/分支管理/分支管理方式1.jpg)<br/>
### **2. 合并分支**
在“和并请求PR”下点击“新建合并请求”后
![](../../static/img/代码库管理/分支管理/分支管理方式3.png)<br/>
如下图所示,用户可以选择源分支与目标分支以及填写分支信息后提交分支合并请求。
![](../../static/img/代码库管理/分支管理/分支管理方式2.png)<br/>

View File

@ -1,4 +1,19 @@
---
sidebar_label: '文件管理'
sidebar_position: 4
---
---
### **1. 文件管理位置**
在代码库界面,可直接对代码库中该分支下的文件进行操作,如下图所示。
![](../../static/img/代码库管理/文件管理/文件管理入口.png)<br/>
### **2. 进入目录**
点击进入相关目录,找到要编辑的文件,如下图所示。
![](../../static/img/代码库管理/文件管理/进入文件所在目录.png)<br/>
### **3. 进入文件编辑页面**
在线编辑文件,单击文件,即可进入编辑文件页面,如下图所示。
![](../../static/img/代码库管理/文件管理/进入文件编辑界面.png)<br/>
### **4. 编辑文件**
编辑界面右侧有三个按钮,分别是“下载”、“编辑”和“删除”,点击下载即可将文件下载到本地,编辑则可在线编辑文档,删除则将文件从代码库中删除,按钮位置如下图所示。
![](../../static/img/代码库管理/文件管理/文件编辑按钮.png)<br/>

View File

@ -3,4 +3,11 @@ sidebar_label: '代码评审'
sidebar_position: 3
---
# 代码评审
# 代码评审
### **1. 进入代码评审**
如下图所示,点击“代码评审”按钮可以进入代码评审
![](../../static/img/PR/进入代码评审.png)<br/>
### **2. 代码评审界面**
如下图所示用户可以在该界面下查看该PR操作要合并的新的代码并对其进行评审。
![](../../static/img/PR/具体代码评审.png)<br/>

View File

@ -62,6 +62,6 @@ sidebar_position: 1
## 用户操作流程
![](../../static/img/di_san_fang/重晴鸟代码溯源/用户操作流程.png)<br/>
![](../../static/img/di_san_fang/重晴鸟代码溯源/用户操作流程(新).png)<br/>
<center>用户操作流程</center><br/>

View File

@ -12,6 +12,7 @@ sidebar_position: 2
![](/img/notice/home_notice.png)
<br/>
或在头像下拉列表中选择设置可以进入消息通知设置界面;
![](/img/notice/into_notice.png)
#### 2.进行通知设置

View File

@ -1,5 +1,7 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const path = require('path');
const fs = require('fs');
import("@easyops-cn/docusaurus-search-local").PluginOptions;
/** @type {import('@docusaurus/types').DocusaurusConfig} */
@ -15,7 +17,47 @@ module.exports = {
projectName: 'docusaurus-luffyzh-website', // Usually your repo name.
scripts: [],
// stylesheets: ['styles/dark-mode.css'],
plugins: [
// 添加API路由
function apiRoutes(context, options) {
return {
name: 'api-routes-plugin',
configureWebpack(config, isServer, utils) {
return {
resolve: {
alias: {
// 添加API路径别名
'@api': path.resolve(__dirname, 'api'),
},
},
};
},
// 添加API路由处理
async postBuild({ routesPaths = [], outDir }) {
// 创建API目录
const apiOutDir = path.join(outDir, 'api');
if (!fs.existsSync(apiOutDir)) {
fs.mkdirSync(apiOutDir);
}
// 复制反馈数据文件到构建目录
const dataFilePath = path.join(process.cwd(), 'feedback-data.json');
if (fs.existsSync(dataFilePath)) {
fs.copyFileSync(dataFilePath, path.join(outDir, 'feedback-data.json'));
} else {
fs.writeFileSync(path.join(outDir, 'feedback-data.json'), '[]', 'utf8');
}
},
};
},
],
themeConfig: {
docs:{
sidebar:{
hideable:true,
},
},
metadata:[
{name:"Keywords",content:"Gitlink,forgeplus,GitLink,gitLink,GitLink,gitlink,帮助中心"},
{name:"hostname",content:"gitlink.org.cn"},
@ -41,6 +83,7 @@ module.exports = {
respectPrefersColorScheme: true,
},
navbar: {
hideOnScroll:true,
style:"dark",
title: '',
logo: {
@ -58,6 +101,16 @@ module.exports = {
position: 'left',
label: '帮助中心'
},
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: true
},
{
to: '/feedback-management',
label: '反馈管理',
position: 'right',
},
// {
// href: 'https://github.com/boxyhq',
// position: 'right',
@ -172,4 +225,4 @@ module.exports = {
defaultLocale: 'zh-cn',
locales: ['zh-cn'],
},
};
};

1
helper.test Normal file
View File

@ -0,0 +1 @@
测试同步详细日志增强功能

7
install-node.bat Normal file
View File

@ -0,0 +1,7 @@
@echo off
echo 正在下载Node.js安装程序...
powershell -Command "Invoke-WebRequest -Uri https://nodejs.org/dist/v20.11.1/node-v20.11.1-x64.msi -OutFile node-installer.msi"
echo 下载完成正在安装Node.js...
start /wait msiexec /i node-installer.msi /quiet /norestart
echo 安装完成请重新打开命令提示符或PowerShell以使用Node.js和npm。
pause

BIN
node-installer.msi Normal file

Binary file not shown.

4
npm-install.bat Normal file
View File

@ -0,0 +1,4 @@
@echo off
set PATH=%PATH%;C:\nodejs
cd /d %~dp0
npm install

BIN
nvm-setup.exe Normal file

Binary file not shown.

109
package-lock.json generated
View File

@ -12,6 +12,7 @@
"@docusaurus/core": "2.4.1",
"@docusaurus/plugin-client-redirects": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "1.6.22",
"@node-rs/jieba": "^1.7.0",
"clsx": "1.2.1",
@ -2641,6 +2642,46 @@
"node": ">=16.14"
}
},
"node_modules/@easyops-cn/autocomplete.js": {
"version": "0.38.1",
"resolved": "https://registry.npmmirror.com/@easyops-cn/autocomplete.js/-/autocomplete.js-0.38.1.tgz",
"integrity": "sha512-drg76jS6syilOUmVNkyo1c7ZEBPcPuK+aJA7AksM5ZIIbV57DMHCywiCr+uHyv8BE5jUTU98j/H7gVrkHrWW3Q==",
"dependencies": {
"cssesc": "^3.0.0",
"immediate": "^3.2.3"
}
},
"node_modules/@easyops-cn/docusaurus-search-local": {
"version": "0.35.0",
"resolved": "https://registry.npmmirror.com/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.35.0.tgz",
"integrity": "sha512-sHQ8jxsVgHH8MNXJlj20nZZfP/Q0peNTAJwKCN2aPuBwfRIoO0i7LmZFaYKenZmVAW/BD2MtfVd65SREmm3zxg==",
"dependencies": {
"@docusaurus/plugin-content-docs": "^2.0.0-rc.1",
"@docusaurus/theme-translations": "^2.0.0-rc.1",
"@docusaurus/utils": "^2.0.0-rc.1",
"@docusaurus/utils-common": "^2.0.0-rc.1",
"@docusaurus/utils-validation": "^2.0.0-rc.1",
"@easyops-cn/autocomplete.js": "^0.38.1",
"@node-rs/jieba": "^1.6.0",
"cheerio": "^1.0.0-rc.3",
"clsx": "^1.1.1",
"debug": "^4.2.0",
"fs-extra": "^10.0.0",
"klaw-sync": "^6.0.0",
"lunr": "^2.3.9",
"lunr-languages": "^1.4.0",
"mark.js": "^8.11.1",
"tslib": "^2.4.0"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"@docusaurus/theme-common": "^2.0.0-rc.1",
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
@ -7249,6 +7290,11 @@
"node": ">=14.0.0"
}
},
"node_modules/immediate": {
"version": "3.3.0",
"resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.3.0.tgz",
"integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="
},
"node_modules/immer": {
"version": "9.0.16",
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.16.tgz",
@ -7804,6 +7850,14 @@
"node": ">=0.10.0"
}
},
"node_modules/klaw-sync": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/klaw-sync/-/klaw-sync-6.0.0.tgz",
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
"dependencies": {
"graceful-fs": "^4.1.11"
}
},
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@ -7952,6 +8006,11 @@
"node": ">=10"
}
},
"node_modules/lunr": {
"version": "2.3.9",
"resolved": "https://registry.npmmirror.com/lunr/-/lunr-2.3.9.tgz",
"integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="
},
"node_modules/lunr-languages": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.10.0.tgz",
@ -14695,6 +14754,38 @@
"tslib": "^2.4.0"
}
},
"@easyops-cn/autocomplete.js": {
"version": "0.38.1",
"resolved": "https://registry.npmmirror.com/@easyops-cn/autocomplete.js/-/autocomplete.js-0.38.1.tgz",
"integrity": "sha512-drg76jS6syilOUmVNkyo1c7ZEBPcPuK+aJA7AksM5ZIIbV57DMHCywiCr+uHyv8BE5jUTU98j/H7gVrkHrWW3Q==",
"requires": {
"cssesc": "^3.0.0",
"immediate": "^3.2.3"
}
},
"@easyops-cn/docusaurus-search-local": {
"version": "0.35.0",
"resolved": "https://registry.npmmirror.com/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.35.0.tgz",
"integrity": "sha512-sHQ8jxsVgHH8MNXJlj20nZZfP/Q0peNTAJwKCN2aPuBwfRIoO0i7LmZFaYKenZmVAW/BD2MtfVd65SREmm3zxg==",
"requires": {
"@docusaurus/plugin-content-docs": "^2.0.0-rc.1",
"@docusaurus/theme-translations": "^2.0.0-rc.1",
"@docusaurus/utils": "^2.0.0-rc.1",
"@docusaurus/utils-common": "^2.0.0-rc.1",
"@docusaurus/utils-validation": "^2.0.0-rc.1",
"@easyops-cn/autocomplete.js": "^0.38.1",
"@node-rs/jieba": "^1.6.0",
"cheerio": "^1.0.0-rc.3",
"clsx": "^1.1.1",
"debug": "^4.2.0",
"fs-extra": "^10.0.0",
"klaw-sync": "^6.0.0",
"lunr": "^2.3.9",
"lunr-languages": "^1.4.0",
"mark.js": "^8.11.1",
"tslib": "^2.4.0"
}
},
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
@ -18062,6 +18153,11 @@
"queue": "6.0.2"
}
},
"immediate": {
"version": "3.3.0",
"resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.3.0.tgz",
"integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="
},
"immer": {
"version": "9.0.16",
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.16.tgz",
@ -18442,6 +18538,14 @@
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
},
"klaw-sync": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/klaw-sync/-/klaw-sync-6.0.0.tgz",
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
"requires": {
"graceful-fs": "^4.1.11"
}
},
"kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@ -18557,6 +18661,11 @@
"yallist": "^4.0.0"
}
},
"lunr": {
"version": "2.3.9",
"resolved": "https://registry.npmmirror.com/lunr/-/lunr-2.3.9.tgz",
"integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="
},
"lunr-languages": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.10.0.tgz",

View File

@ -1,46 +1,42 @@
{
"name": "docusaurus",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"dev": "docusaurus start --port 3000",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "1.1.0",
"@docusaurus/core": "2.4.1",
"@docusaurus/plugin-client-redirects": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "1.6.22",
"@node-rs/jieba": "^1.7.0",
"clsx": "1.2.1",
"docusaurus-gtm-plugin": "0.0.2",
"docusaurus-plugin-image-zoom": "1.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-modal": "3.16.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=14.18.1 <=18.x"
}
}
{
"name": "docusaurus",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"dev": "docusaurus start --port 3000"
},
"dependencies": {
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "^1.6.22",
"body-parser": "^1.20.2",
"clsx": "^1.2.1",
"docusaurus-plugin-image-zoom": "^1.0.1",
"express": "^4.18.2",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

43
package.json.bak Normal file
View File

@ -0,0 +1,43 @@
{
"name": "docusaurus",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"dev": "docusaurus start --port 3000",
},
"dependencies": {
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "^1.6.22",
"body-parser": "^1.20.2",
"clsx": "^1.2.1",
"docusaurus-plugin-image-zoom": "^1.0.1",
"express": "^4.18.2",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

4
run-dev.bat Normal file
View File

@ -0,0 +1,4 @@
@echo off
set PATH=%PATH%;C:\nodejs
cd /d %~dp0
npm run dev

5
set-nodejs-path.bat Normal file
View File

@ -0,0 +1,5 @@
@echo off
echo 正在设置Node.js环境变量...
setx PATH "%PATH%;C:\nodejs" /M
echo 环境变量设置完成请重新打开命令提示符或PowerShell以使更改生效。
pause

View File

@ -0,0 +1,178 @@
import React, { useState } from 'react';
import styles from './styles.module.css';
export default function DocFeedback() {
const [voted, setVoted] = useState(false);
const [feedback, setFeedback] = useState('');
const [showForm, setShowForm] = useState(false);
const [submitted, setSubmitted] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
// 获取当前页面URL作为文档标识
const documentUrl = typeof window !== 'undefined' ? window.location.pathname : '';
const handleVote = (isHelpful) => {
setVoted(true);
setShowForm(!isHelpful);
// 发送投票结果到服务器
if (typeof window !== 'undefined') {
try {
const feedbackData = {
documentUrl: documentUrl,
isHelpful: isHelpful,
timestamp: new Date().toISOString(),
feedbackType: 'vote'
};
// 将反馈保存到localStorage以便在客户端保留记录
const storedFeedbacks = JSON.parse(localStorage.getItem('docFeedbacks') || '[]');
storedFeedbacks.push(feedbackData);
localStorage.setItem('docFeedbacks', JSON.stringify(storedFeedbacks));
console.log(isHelpful ? '用户认为有帮助' : '用户认为没有帮助', feedbackData);
// 这里应该添加发送到服务器的代码
// fetch('/api/feedback', {
// method: 'POST',
// headers: { 'Content-Type': 'application/json' },
// body: JSON.stringify(feedbackData)
// });
} catch (error) {
console.error('提交反馈时出错:', error);
}
}
if (isHelpful) {
setTimeout(() => setVoted(false), 3000);
}
};
const handleSubmit = (e) => {
e.preventDefault();
setIsSubmitting(true);
// 发送详细反馈到服务器
if (typeof window !== 'undefined') {
try {
const feedbackData = {
documentUrl: documentUrl,
feedback: feedback,
timestamp: new Date().toISOString(),
feedbackType: 'detailed'
};
// 将反馈保存到localStorage以便在客户端保留记录
const storedFeedbacks = JSON.parse(localStorage.getItem('docFeedbacks') || '[]');
storedFeedbacks.push(feedbackData);
localStorage.setItem('docFeedbacks', JSON.stringify(storedFeedbacks));
console.log('用户反馈:', feedbackData);
// 这里应该添加发送到服务器的代码
// fetch('/api/feedback', {
// method: 'POST',
// headers: { 'Content-Type': 'application/json' },
// body: JSON.stringify(feedbackData)
// })
// .then(response => response.json())
// .then(data => {
// setSubmitted(true);
// setShowForm(false);
// setIsSubmitting(false);
// })
// .catch(error => {
// console.error('提交反馈时出错:', error);
// setIsSubmitting(false);
// });
// 模拟提交成功
setTimeout(() => {
setSubmitted(true);
setShowForm(false);
setIsSubmitting(false);
setTimeout(() => {
setVoted(false);
setFeedback('');
setSubmitted(false);
}, 3000);
}, 500);
} catch (error) {
console.error('提交反馈时出错:', error);
setIsSubmitting(false);
}
}
};
return (
<div className={styles.feedbackContainer}>
{!voted && !submitted && (
<div className={styles.feedbackQuestion}>
<p>这篇文档对您有帮助吗</p>
<div className={styles.feedbackButtons}>
<button
onClick={() => handleVote(true)}
className={styles.feedbackButton}
>
👍 有帮助
</button>
<button
onClick={() => handleVote(false)}
className={styles.feedbackButton}
>
👎 没有帮助
</button>
</div>
</div>
)}
{voted && !showForm && !submitted && (
<div className={styles.feedbackThanks}>
感谢您的反馈
</div>
)}
{showForm && (
<form onSubmit={handleSubmit} className={styles.feedbackForm}>
<p>您希望如何改进这篇文档</p>
<textarea
value={feedback}
onChange={(e) => setFeedback(e.target.value)}
placeholder="请告诉我们如何改进这篇文档..."
rows={4}
className={styles.feedbackTextarea}
required
/>
<div className={styles.feedbackFormButtons}>
<button
type="submit"
className={styles.submitButton}
disabled={isSubmitting}
>
{isSubmitting ? '提交中...' : '提交反馈'}
</button>
<button
type="button"
onClick={() => {
setShowForm(false);
setVoted(false);
}}
className={styles.cancelButton}
disabled={isSubmitting}
>
取消
</button>
</div>
</form>
)}
{submitted && (
<div className={styles.feedbackThanks}>
感谢您的宝贵反馈我们会认真考虑您的建议
</div>
)}
</div>
);
}

View File

@ -0,0 +1,79 @@
.feedbackContainer {
margin-top: 3rem;
padding: 1.5rem;
border-top: 1px solid var(--ifm-color-emphasis-200);
}
.feedbackQuestion {
display: flex;
flex-direction: column;
align-items: center;
}
.feedbackButtons {
display: flex;
gap: 1rem;
margin-top: 0.5rem;
}
.feedbackButton {
padding: 0.5rem 1rem;
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: 4px;
background: var(--ifm-color-emphasis-100);
cursor: pointer;
transition: all 0.2s ease;
}
.feedbackButton:hover {
background: var(--ifm-color-emphasis-200);
}
.feedbackThanks {
text-align: center;
padding: 1rem;
color: var(--ifm-color-success-dark);
}
.feedbackForm {
margin-top: 1rem;
}
.feedbackTextarea {
width: 100%;
padding: 0.5rem;
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: 4px;
margin-bottom: 1rem;
}
.feedbackFormButtons {
display: flex;
gap: 1rem;
justify-content: flex-end;
}
.submitButton {
padding: 0.5rem 1rem;
background: var(--ifm-color-primary);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.submitButton:hover {
background: var(--ifm-color-primary-dark);
}
.cancelButton {
padding: 0.5rem 1rem;
background: var(--ifm-color-emphasis-200);
border: none;
border-radius: 4px;
cursor: pointer;
}
.cancelButton:hover {
background: var(--ifm-color-emphasis-300);
}

View File

@ -0,0 +1,78 @@
import React, { useState, useEffect } from 'react';
import Layout from '@theme/Layout';
export default function FeedbackDashboard() {
const [feedbacks, setFeedbacks] = useState([]);
useEffect(() => {
// 从localStorage加载反馈
const storedFeedbacks = JSON.parse(localStorage.getItem('docFeedbacks') || '[]');
setFeedbacks(storedFeedbacks);
}, []);
// 清除所有反馈
const clearFeedbacks = () => {
if (confirm('确定要清除所有反馈吗?')) {
localStorage.setItem('docFeedbacks', '[]');
setFeedbacks([]);
}
};
return (
<Layout title="反馈管理">
<div className="container margin-vert--lg">
<h1>反馈管理</h1>
<div className="margin-bottom--lg">
<h2>总计: {feedbacks.length} 条反馈</h2>
{feedbacks.length > 0 && (
<button
onClick={clearFeedbacks}
className="button button--danger"
>
清除所有反馈
</button>
)}
</div>
<div className="card-demo margin-bottom--lg">
<div className="card">
<div className="card__header">
<h3>反馈列表</h3>
</div>
<div className="card__body">
{feedbacks.length === 0 ? (
<p>暂无反馈数据</p>
) : (
<table className="table">
<thead>
<tr>
<th>类型</th>
<th>页面</th>
<th>内容</th>
<th>时间</th>
</tr>
</thead>
<tbody>
{feedbacks.map((feedback, index) => (
<tr key={index}>
<td>{feedback.type === 'vote' ? '投票' : '评论'}</td>
<td>{feedback.page}</td>
<td>
{feedback.type === 'vote'
? (feedback.isHelpful ? '👍 有帮助' : '👎 没有帮助')
: feedback.content}
</td>
<td>{new Date(feedback.timestamp).toLocaleString('zh-CN')}</td>
</tr>
))}
</tbody>
</table>
)}
</div>
</div>
</div>
</div>
</Layout>
);
}

View File

@ -0,0 +1,7 @@
---
title: 反馈管理
---
import FeedbackDashboard from '@site/src/pages/feedback-dashboard';
<FeedbackDashboard />

View File

@ -0,0 +1,92 @@
import React, { useState, useEffect } from 'react';
import Layout from '@theme/Layout';
export default function FeedbackManagement() {
const [feedbacks, setFeedbacks] = useState([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
// 从localStorage加载反馈数据
if (typeof window !== 'undefined') {
try {
const storedFeedbacks = JSON.parse(localStorage.getItem('docFeedbacks') || '[]');
setFeedbacks(storedFeedbacks);
} catch (error) {
console.error('加载反馈数据时出错:', error);
} finally {
setLoading(false);
}
}
}, []);
// 清除所有反馈
const handleClearFeedbacks = () => {
if (typeof window !== 'undefined') {
localStorage.removeItem('docFeedbacks');
setFeedbacks([]);
}
};
// 解码URL
const decodeDocumentUrl = (url) => {
try {
return decodeURIComponent(url);
} catch (error) {
console.error('URL解码失败:', error);
return url;
}
};
return (
<Layout title="反馈管理" description="查看文档反馈">
<div className="container margin-vert--lg">
<h1>反馈管理</h1>
<p>总计: {feedbacks.length} 条反馈</p>
{loading ? (
<p>加载中...</p>
) : feedbacks.length > 0 ? (
<>
<button
onClick={handleClearFeedbacks}
className="button button--danger button--sm margin-bottom--md"
>
清除所有反馈
</button>
<table className="table">
<thead>
<tr>
<th>文档URL</th>
<th>类型</th>
<th>内容</th>
<th>时间</th>
</tr>
</thead>
<tbody>
{feedbacks.map((feedback, index) => (
<tr key={index}>
<td>{decodeDocumentUrl(feedback.documentUrl)}</td>
<td>
{feedback.feedbackType === 'vote'
? (feedback.isHelpful ? '[+] 有帮助' : '[-] 没有帮助')
: '详细反馈'}
</td>
<td>
{feedback.feedbackType === 'vote'
? (feedback.isHelpful ? '有帮助' : '没有帮助')
: feedback.feedback}
</td>
<td>{new Date(feedback.timestamp).toLocaleString()}</td>
</tr>
))}
</tbody>
</table>
</>
) : (
<p>暂无反馈数据</p>
)}
</div>
</Layout>
);
}

View File

@ -0,0 +1,45 @@
import React, { useState, useEffect } from 'react';
import styles from './styles.module.css';
const BackToTop = () => {
const [isVisible, setIsVisible] = useState(false);
// 检测滚动位置,决定是否显示按钮
useEffect(() => {
const toggleVisibility = () => {
if (window.pageYOffset > 300) {
setIsVisible(true);
} else {
setIsVisible(false);
}
};
window.addEventListener('scroll', toggleVisibility);
return () => window.removeEventListener('scroll', toggleVisibility);
}, []);
// 滚动到顶部的函数
const scrollToTop = () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
};
return (
<>
{isVisible && (
<button
onClick={scrollToTop}
className={styles.backToTop}
title="返回顶部"
aria-label="返回顶部"
>
</button>
)}
</>
);
};
export default BackToTop;

View File

@ -0,0 +1,33 @@
.backToTop {
position: fixed;
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--ifm-color-primary);
color: white;
border: none;
font-size: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 100;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.backToTop:hover {
transform: translateY(-3px);
background-color: var(--ifm-color-primary-darker);
}
@media (max-width: 768px) {
.backToTop {
bottom: 15px;
right: 15px;
width: 35px;
height: 35px;
}
}

View File

@ -0,0 +1,11 @@
import React from 'react';
import DocFeedback from '@site/src/components/DocFeedback';
export default function DocItemFooter() {
return (
<footer className="docusaurus-mt-lg">
<DocFeedback />
</footer>
);
}

View File

@ -0,0 +1,11 @@
.lastUpdated {
margin-top: 0.2rem;
font-style: italic;
font-size: smaller;
}
@media (min-width: 997px) {
.lastUpdated {
text-align: right;
}
}

View File

@ -0,0 +1,81 @@
import React, { useEffect, useState } from 'react';
import styles from './styles.module.css';
const TableOfContents = () => {
const [headings, setHeadings] = useState([]);
const [activeId, setActiveId] = useState('');
useEffect(() => {
// 获取页面中所有的标题元素
const elements = Array.from(document.querySelectorAll('h2, h3, h4, h5, h6'))
.filter(element => element.id);
const headingsData = elements.map(element => ({
id: element.id,
text: element.textContent,
level: Number(element.tagName.substring(1))
}));
setHeadings(headingsData);
// 监听滚动事件,更新当前激活的标题
const handleScroll = () => {
const scrollPosition = window.scrollY;
// 找到当前视图中的标题
const currentHeading = headingsData
.filter(heading => {
const element = document.getElementById(heading.id);
if (!element) return false;
return element.offsetTop <= scrollPosition + 100;
})
.pop();
if (currentHeading) {
setActiveId(currentHeading.id);
}
};
window.addEventListener('scroll', handleScroll);
handleScroll(); // 初始化激活的标题
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, []);
// 如果没有标题,不显示目录
if (headings.length === 0) {
return null;
}
return (
<div className={styles.tableOfContents}>
<div className={styles.tocHeader}>目录</div>
<nav>
<ul className={styles.tocList}>
{headings.map(heading => (
<li
key={heading.id}
className={`${styles.tocItem} ${styles[`tocLevel${heading.level}`]} ${activeId === heading.id ? styles.tocItemActive : ''}`}
>
<a
href={`#${heading.id}`}
onClick={(e) => {
e.preventDefault();
document.getElementById(heading.id).scrollIntoView({
behavior: 'smooth'
});
}}
>
{heading.text}
</a>
</li>
))}
</ul>
</nav>
</div>
);
};
export default TableOfContents;

View File

@ -0,0 +1,73 @@
.tableOfContents {
position: sticky;
top: 70px;
max-height: calc(100vh - 100px);
overflow-y: auto;
padding: 0.75rem;
margin-bottom: 1rem;
border-left: 1px solid var(--ifm-color-emphasis-300);
border-radius: 4px;
background-color: var(--ifm-background-surface-color);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.tocHeader {
font-weight: bold;
margin-bottom: 0.5rem;
color: var(--ifm-color-primary);
font-size: 1rem;
}
.tocList {
list-style: none;
padding-left: 0;
margin-bottom: 0;
}
.tocItem {
margin: 0.25rem 0;
font-size: 0.875rem;
}
.tocItem a {
display: block;
padding: 0.25rem 0;
color: var(--ifm-color-content);
text-decoration: none;
transition: color 0.2s;
}
.tocItem a:hover {
color: var(--ifm-color-primary);
}
.tocItemActive a {
color: var(--ifm-color-primary);
font-weight: 600;
}
.tocLevel2 {
padding-left: 0;
}
.tocLevel3 {
padding-left: 1rem;
}
.tocLevel4 {
padding-left: 2rem;
}
.tocLevel5 {
padding-left: 3rem;
}
.tocLevel6 {
padding-left: 4rem;
}
@media (max-width: 996px) {
.tableOfContents {
display: none;
}
}

View File

@ -0,0 +1,19 @@
import React from 'react';
import DocItem from '@theme-original/DocItem';
import BackToTop from './BackToTop';
import TableOfContents from './TableOfContents';
import styles from './styles.module.css';
export default function DocItemWrapper(props) {
return (
<div className={styles.docItemContainer}>
<div className={styles.docItemContent}>
<DocItem {...props} />
</div>
<div className={styles.docItemSidebar}>
<TableOfContents />
</div>
<BackToTop />
</div>
);
}

View File

@ -0,0 +1,23 @@
.docItemContainer {
display: flex;
position: relative;
}
.docItemContent {
flex: 1;
}
.docItemSidebar {
width: 240px;
margin-left: 2rem;
}
@media (max-width: 996px) {
.docItemContainer {
display: block;
}
.docItemSidebar {
display: none;
}
}

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,4 @@
{
"label": "机器人(Bot)",
"position": 8
}

View File

@ -0,0 +1,20 @@
---
sidebar_label: 'bot安装'
sidebar_position: 1
---
# bot安装
Bot安装是进行bot安装和管理控制的重要模块主要包括bot安装、安装查询、安装管理等功能。
在bot详情页用户点击“安装此Bot”按钮后可以看到该bot工作所需的各项权限信息。若用户同意授予bot所需的相关权限即可进行安装。用户可选择将bot安装到所有仓库用户拥有的所有仓库也可以选择指定的仓库进行安装。
![botinstall1](../../../static/img/bot/botinstall1.png)
在个人“设置”或者“仓库设置”中用户可以看到目前已经安装的Bot情况点击“配置”按钮可以对bot安装情况进行配置点击“卸载”按钮可以进行卸载。
![botinstall2](../../../static/img/bot/botinstall2.png)
在bot安装配置页中用户可以掌握该bot的安装位置和工作状态。若用户需要更改bot的工作仓库时可以进行更改安装位置。bot的工作状态包括激活和挂起用户可根据需要对bot的状态进行调整将其挂起或者激活会影响到bot对仓库数据的访问权限。
![botinstall3](../../../static/img/bot/botinstall3.png)

View File

@ -0,0 +1,24 @@
---
sidebar_label: 'bot市场'
sidebar_position: 4
---
# Bot市场
Bot市场是进行Bot分享与复用的重要模块主要包括bot的搜索发现详情查看等功能。
Bot市场主页中展示了目前所有已经上架市场的bot简要信息包括bot的头像名称开发者简介和安装次数等信息用户可根据这些基本信息初步判断该bot是否符合自己的项目需求。
在bot市场主页中用户可以选择指定的bot种类筛选出特定分类的bot在这个种类范围内进行搜索与选择。
此外用户通过在搜索栏中输入关键字进行搜索可检索出内容包含指定关键字的相关bot。
用户可结合种类筛选和关键字搜索缩小范围在市场中快速找到符合项目相关需求的bot。
![botmarket1](../../../static/img/bot/botmarket1.png)
在bot市场页中用户点击指定的bot卡片即可进入该bot的详情页。Bot的详情页包含bot的头像名称开发者种类和详细介绍等信息用户可在此掌握该bot的各项介绍进一步判断是否将其安装到指定仓库中。
![botmarket2](../../../static/img/bot/botmarket2.png)
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。

View File

@ -0,0 +1,22 @@
---
sidebar_label: 'bot开发'
sidebar_position: 3
---
# Bot开发
Bot开发是开发者进行bot注册的重要模块。
在个人“设置”中用户可以看到目前已经注册的bot列表点击对应bot的“编辑”按钮可以对已注册的bot进行配置点击“Bot注册”按钮开始注册新的bot。
![botcreate1](../../../static/img/bot/botcreate1.png)
在注册页中开发者需要填写bot注册的相关信息包括bot的名称、Webhook 地址详细介绍等系统将对开发者输入的信息进行合法性校验确保bot各项信息的完整性和有效性。此外系统将自动生成bot的唯一标识同时调用 GitLink 平台的相关接口生成bot的身份凭证信息包括客户端密钥和私钥等。
开发者需通过这些身份信息结合平台接口进行bot身份认证后调用相关接口完成bot的相关功能。
平台开发API链接待完善https://www.gitlink.org.cn/docs/api#introduction
![botcreate2](../../../static/img/bot/botcreate2.png)
![botcreate3](../../../static/img/bot/botcreate3.png)

View File

@ -0,0 +1,23 @@
---
sidebar_label: 'bot配置'
sidebar_position: 2
---
# Bot配置
Bot配置是开发者进行bot维护和配置的重要模块主要包括bot基本信息维护、权限&订阅事件管理、高级选项配置等功能。
Bot的基本信息维护中开发者可以看到bot的各项基本信息并可以根据需要对bot的头像名称Webhook地址等进行修改。
![botconfig1](../../../static/img/bot/botconfig1.png)
Bot的权限&订阅事件管理中开发者可根据对仓库资源的访问需要为bot分配不同的权限和等级比如增加代码库权限将拉取请求的写权限变为读权限等。开发者还能更改当前bot订阅的事件列表比如订阅代码库推送取消拉取请求分配订阅等以实现bot功能的更新与升级。
![botconfig2](../../../static/img/bot/botconfig2.png)
Bot高级选项配置中开发者可以改变bot的公私有状态从而影响到bot的使用范围。需要注意的是公开状态下的bot在已有其他仓库安装的情况下不能变成私有。开发者可选择将bot上架到市场需要填写上架信息包括市场简介主要功能次要功能等各项信息。
开发者还能进行bot的删除和转让操作发起转让意味着更改bot的所有权需要输入接受者的用户名。在接受者确定接受后即可完成bot的所有权变更拒绝则会取消本次的转让操作。
![botconfig3](../../../static/img/bot/botconfig3.png)

View File

@ -0,0 +1,4 @@
{
"label": "DevOps引擎(Engine)",
"position": 6
}

View File

@ -0,0 +1,12 @@
---
sidebar_label: '代码流水线'
sidebar_position: 5
---
# 代码流水线
可以通过代码的形式(YAML格式)来配置流水线,首先选择代码流水线和对应的分支:
![code_workflow1](../../../static/img/engine/code_workflow1.jpg)
编辑流水线代码,其流水线名称描述、触发器、全局参数、执行串行/并发和流水线编排等概念同图形流水线,具体描述如下:
![code_workflow2](../../../static/img/engine/code_workflow2.png)

View File

@ -0,0 +1,15 @@
---
sidebar_label: '参数配置'
sidebar_position: 2
---
# 参数配置
可在流水线中使用,实现动态参数配置;有字符串、数字、布尔三种类型。
![parameter1](../../../static/img/engine/parameter1.png)
在流水线的配置中通过如下方式获取参数:
![parameter2](../../../static/img/engine/parameter2.png)

View File

@ -0,0 +1,50 @@
---
sidebar_label: '图形流水线'
sidebar_position: 4
---
# 图形流水线
## 基本信息
可以编辑流水线的名称、描述
同一仓库下的流水线名称不能重复
![vis_workflow1](../../../static/img/engine/vis_workflow1.png)
## 触发器
注:流水线编排时,触发器要放在开始节点之前;目前一条流水线仅添加支持一个触发器
* 定时触发器cron可通过填写cron表达式设置触发的具体时间
![vis_workflow2](../../../static/img/engine/vis_workflow2.png)
* 事件触发器GitLink_Webhook给出了常见的代码变更事件触发包括推送代码、合并请求、创建标签
![vis_workflow3](../../../static/img/engine/vis_workflow3.png)
## 全局参数
添加后可在当前流水线中使用
![vis_workflow4](../../../static/img/engine/vis_workflow4.png)
使用实例
![vis_workflow5](../../../static/img/engine/vis_workflow5.png)
## 并发执行
![vis_workflow6](../../../static/img/engine/vis_workflow6.png)
开启后同一流水线可同时并发执行n个流水线实例每触发一次我们得到一个流水线实例
![vis_workflow7](../../../static/img/engine/vis_workflow7.png)
若未开启则当前流水线实例执行中后面的实例处于排队状态最多可排队5个实例。当前实例执行完成下一个实例开始执行。
![vis_workflow8](../../../static/img/engine/vis_workflow8.png)
## 流水线编排
每条流水线必须要有一个开始节点、结束节点,至少一个任务节点。支持串行编排和并行编排。

View File

@ -0,0 +1,16 @@
---
sidebar_label: '密钥设置'
sidebar_position: 3
---
# 密钥设置
将账号密码、密钥、证书等存放到密钥管理里,配置后可直接在流水线中使用,避免因直接填写引起的泄露风险。
![secret1](../../../static/img/engine/secret1.png)
使用示例
注:节点输入参数中,下拉选项为密钥类型,需要提前配置好密钥在流水线中选择使用
![secret2](../../../static/img/engine/secret2.png)

View File

@ -0,0 +1,13 @@
---
sidebar_label: '引擎简介'
sidebar_position: 1
---
# 引擎
引擎(Engine)是GitLink提供的一款DevOps工具通过简单的节点编排来构建开发、测试、部署流水线从而创建自动化的软件交付流程。
它可以实现持续的代码集成,让开发者能尽早发现质量问题,快速定位修复,提升软件开发效率和质量;自动化的代码扫描、编译打包、单元测试,把研发团队从重复的工作中解放出来,聚焦到更有价值的事情上。
![engine_intro](../../../static/img/engine/engine_intro.jpg)
在引擎页面中,用户可以创建和编辑图形流水线或代码流水线、设置外部参数、管理密钥等操作。

View File

@ -0,0 +1,10 @@
---
sidebar_label: '执行记录查询'
sidebar_position: 6
---
# 执行记录查询
用户可以查看流水线的运行状态
![result](../../../static/img/engine/result.png)

View File

@ -0,0 +1,74 @@
---
sidebar_label: "介绍"
label: "介绍"
sidebar_position: 1
slug: /
---
# 关于GitLink
GitLink确实开源是CCF官方指定的开源创新服务平台旨在以“为开源创新服务”为使命以“成为开源创新的汇聚地”为愿景秉承“创新、开放、协作、共享”的价值观致力于为大规模开源开放协同创新助力赋能打造创新成果孵化和新工科人才培养的开源创新生态
![](/img/ccf_gitlink.png)
# 平台功能
- **分布式协作开发**:支持在线文件编辑、分支管理、贡献统计、仓库复刻、合并请求;
- **一站式过程管理**支持疑修、里程碑、通知提醒、标签归档、Wiki文档、组织管理
- **高效流水线运维**:提供轻量级工作流引擎,并支持自定义配置、静态扫描、制品构建;
- **多层次代码分析**:支持代码溯源分析、许可证风险分析、开源漏洞检测和加固建议;
- **多维度用户画像**:支持开发活动统计、贡献日历、能力建模、角色与专业定位分析。
# 帮助文档
帮助文档有助于您全面了解GitLink平台让我们一起为开源创新贡献力量
<div class="row">
<div class="col col--12">
<section class="row list">
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/快速开始/注册GitLink账号">
<h2 class="text--truncate cardTitle" title="快速开始">快速开始</h2>
<p>帮助用户快速注册使用平台[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/代码库管理/仓库创建">
<h2 class="text--truncate cardTitle" title="代码库管理">代码库管理</h2>
<p>代码库使用及设置[8个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/组织管理/组织简介">
<h2 class="text--truncate cardTitle" title="组织管理">组织管理</h2>
<p>组织使用及设置[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/疑修/疑修简介">
<h2 class="text--truncate cardTitle" title="疑修">疑修</h2>
<p>疑修(Issue)使用及设置[7个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/合并请求/合并请求简介">
<h2 class="text--truncate cardTitle" title="合并请求">合并请求</h2>
<p>合并请求(Pull Request)使用及设置[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/DevOps引擎/引擎简介">
<h2 class="text--truncate cardTitle" title="DevOps引擎">DevOps引擎</h2>
<p>DevOps引擎(Engine)使用及设置[6个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/维基/模板导入及导出">
<h2 class="text--truncate cardTitle" title="维基">维基</h2>
<p>维基(Wiki)使用及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/Bot市场/bot安装">
<h2 class="text--truncate cardTitle" title="Bot市场">Bot市场</h2>
<p>Bot市场使用及设置[4个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/第三方服务/跨平台代码同步">
<h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2>
<p>第三方服务使用及设置[3个文档]</p>
</a></article>
</section>
</div>
</div>

View File

@ -0,0 +1,4 @@
{
"label": "个人主页建站",
"position": 13
}

View File

@ -0,0 +1,69 @@
---
sidebar_label: '建站工具'
sidebar_position: 2
---
# 个人建站工具
个人主页建站是一个免费的静态网页托管服务,可用于托管静态个人主页、个人博客等静态页面。个人建站不同工具如下
### Hugo工具
使用Hugo 工具创建的仓库需要将代码仓库中config.toml 文件中的 baseURL 修改
将值改成 个人建站服务中显示的网站地址,
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么 config.toml 中的 baseURL 应该为 http://KingChan.gitlink.net
![img](../../../static/img/个人主页建站/建站工具1.png)
修改完毕后点击提交
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,开始部署
![img](../../../static/img/建站工具3.png)
静态页面预览
![img](../../../static/img/建站工具4.png)
### jekyll工具
如果是jekyll项目
使用jekyll工具创建的个人站点需要对代码仓库中 _config.yml文件中的 baseurl和url两个值进行修改jekyll的配置文件比较特殊需要根据 个人建站服务 中显示的 网站地址
内容修改两个值。
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么结果如下:
baseurl: "/"
url: "http://KingChan.gitlink.net"
![img](../../../static/img/建站工具5.png)
修改完成后点击 提交变更
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,前往建站服务开始部署
![img](../../../static/img/建站工具7.png)
![img](../../../static/img/建站工具8.png)
### hexo工具
如果是 hexo项目
使用Hexo工具创建的仓库需要将代码仓库中_config.yml 文件中的 url修改
将值改成 个人建站服务中显示的网站地址,
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么 _config.toml 中的 url应该为 http://KingChan.gitlink.net
![img](../../../static/img/建站工具9.png)
修改完毕后提交变更
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,前往建站服务开始部署
![img](../../../static/img/建站工具11.png)
![img](../../../static/img/建站工具12.png)
![img](../../../static/img/建站工具13.png)
### file 工具
文档格式工具,使用该工具会部署所选中分支下的所有文件。
注: 以上所有工具都可以使用 gh-pages 分支,在部署时选中 gh-pages 分支,则会按照文档格式工具部署,也就是部署分支下的所有文件。

View File

@ -0,0 +1,50 @@
---
sidebar_label: '建站流程'
sidebar_position: 1
---
# 个人建站流程
### 我的站点
鼠标移动至右上角头像位置,点击设置进入我的设置界面
![img](../../../static/img/建站工具/1.png)
点击左测面板中 个人建站 - 我的站点
![img](../../../static/img/建站工具/3.png)
### 创建站点
在我的站点界面点击 新建站点 按钮,进入新建站点界面
在新建站点界面输入站点名称,此名称将在我的站点列表中展示
并且选择对应的建站工具与主题我们为您提供了3种不同的工具每个工具10种主题一共30种供您挑选
![img](../../../static/img/建站工具/4.png)
填写完毕后,点击页面下方蓝色按钮: 创建站点
![img](../../../static/img/建站工具/5.png)
这样您就拥有了一个网站,并且有了一个代码仓库。
在仓库的 服务 一栏中 个人建站服务的操作界面,这里您可以查看一些您的站点状态、站点名称、网站地址、建站工具、建站时间
### 部署站点
![img](../../../static/img/建站工具/6.png)
点击去部署按钮,选择想要部署的分支后点击确定
![img](../../../static/img/建站工具/7.png)
等待程序运行一会儿后,会返回一些服务器部署信息给您
部署成功后您就可以访问站点了。点击网站地址就可以跳转
![img](../../../static/img/建站工具/8.png)
### 部署完成
![img](../../../static/img/建站工具/9.png)

View File

@ -0,0 +1,41 @@
---
sidebar_label: 'WebIDE'
sidebar_position: 9
---
### **1. 语言服务**
● 支持近 40 种语言的语法高亮
● 支持 JavaScript/TypeScript、HTML、CSS、JSON、Markdown 的基于 LSP (Language Server Protocol) 语言特性功能,具备智能提示和大纲信息以及单文件内跳转。
● 支持 Java、Go、Python、C++、Php 的基于 Tree Sitter 的在线语言服务能力,提供查看引用、符号搜索等特性
### **2. WebIDE 入口**
从 Gitlink 仓库首页 点击Web IDE 按键即可进入
![](../../../static/img/代码库管理/WebIDE/WebIDE入口.png)<br/>
### **3. 分支**
支持分支切换:点击左下角分支名即可切换分支。
![](../../../static/img/代码库管理/WebIDE/WebIDE切换分支.png)<br/>
### **4. 搜索**
当前支持 Gitlink 仓库内代码搜索(支持单词匹配和文件过滤)和文件搜索。
![](../../../static/img/代码库管理/WebIDE/WebIDE搜索.png)<br/>
### **5. 行高亮**
支持单行或多行高亮,点击行号即可高亮行,按住 Shift 可选中连续多行。
![](../../../static/img/代码库管理/WebIDE/WebIDE行高亮.png)<br/>
### **6. Blame**
支持查看单行 blame 信息hover 后可展示详细信息。
![](../../../static/img/代码库管理/WebIDE/WebIDEblame.png)<br/>
### **7. Graph**
支持 graph 视图,可查看分支 commits 历史以及每个 commit 详细文件变更,并支持文件 diff 查看。底部状态栏左下角点击 Git Graph 或在命令面板输入 View Git Graph即可打开 Git Graph 视图。
![](../../../static/img/代码库管理/WebIDE/WebIDEGraph.png)<br/>
### **8. WebSCM**
可以在极速版新建分支,修改代码后在 SCM 面板看到变更文件列表,写完 commit message 后提交到 Gitlink 上。如果想快速修改一些文件可以不用在本地修改,直接通过极速版修改代码一次性提交。
### **9. 代码在线运行**
● 集成了基于 skypack 的更加轻量的 CodeSwing 插件,可以在极速版去运行前端代码。
● 集成了基于 Pyodide 的 Code-Runner-For-Web 插件,可以将 Python 的运行搬到浏览器上。
![](../../../static/img/代码库管理/WebIDE/WebIDE代码在线运行.png)<br/>

View File

@ -0,0 +1,38 @@
---
sidebar_label: 'Webhook'
sidebar_position: 8
---
### **1. Webhook模块入口**
在项目主页点击“仓库设置”按键再点击“网络钩子”按键即可进入仓库的Webhook模块。
![](../../../static/img/代码库管理/Webhook/Webhook入口.png)<br/>
### **2. 添加Webhook**
单击“添加Webhook”按键可进入配置Webhook页面
![](../../../static/img/代码库管理/Webhook/添加Webhook.png)<br/>
![](../../../static/img/代码库管理/Webhook/Webhook配置.png)<br/>
### **3. 编辑Webhook**
添加Webhook后如下图所示可以通过点击右侧”编辑“按键来对每个Webhook进行编辑操作。
![](../../../static/img/代码库管理/Webhook/编辑Webhook.png)<br/>
### **4. 删除Webhook**
添加Webhook后如下图所示可以通过点击右侧”删除“按键来对每个Webhook进行删除操作。
![](../../../static/img/代码库管理/Webhook/删除webhook.png)<br/>
### **5. Webhook支持的事件类型**
在GitLink中Webhook支持的事件类型如下
- 推送git推送到存储库
- 代码库:创建或删除代码库
- 创建:创建分支或标签
- 删除:删除分支或标签
- 合并请求:合并请求被打开、被关闭、被重新打开或被编辑
- 合并请求分配:合并请求被分配或取消分配
- 合并请求收入里程碑:合并请求被记录或取消记录于里程碑中
- 合并请求被评论:合并请求评论被创建、编辑或删除
- 合并请求标签:合并请求的标签被更新或清除
- 合并请求审查:合并请求被批准、拒绝或提出审查意见,审查人员的修改,审查线程已解决或未解决
- 合并请求被同步:合并请求被同步

View File

@ -0,0 +1,4 @@
{
"label": "代码库管理",
"position": 2
}

View File

@ -0,0 +1,11 @@
---
sidebar_label: '仓库创建'
sidebar_position: 1
---
### **1. 仓库创建入口**
用户可以通过平台主页右上角的按键以及个人主页参与项目模块的“新建”按键来创建仓库。
![](../../../static/img/代码库管理/仓库创建/仓库创建.png)<br/>
### **2. 填写项目基本信息**
进入新建项目页面后,如下图所示,填写拥有者、项目名称、项目标识等信息,单击”创建项目“按键即可完成创建。
![](../../../static/img/代码库管理/仓库创建/新建项目.png)<br/>

View File

@ -0,0 +1,11 @@
---
sidebar_label: '仓库设置'
sidebar_position: 2
---
### **1. 仓库设置入口**
在仓库主页点击“仓库设置”按键即可进入仓库设置模块。仓库设置中可以修改项目的基本信息、进行成员管理、配置webhook、设置分支以及安装bot。
![](../../../static/img/代码库管理/仓库设置/仓库设置.png)<br/>
### **2. 基本设置**
进入仓库设置模块后,单击”基本设置“按键,进入基本设置模块,如下图所示,可以对项目的项目名称、项目标识、项目简介、项目类别、项目语言等基本信息进行修改。单击“转移”按键可以将仓库转移给其他用户和组织,单击“删除本仓库“按键可以删除本仓库。
![](../../../static/img/代码库管理/仓库设置/基本设置.png)<br/>

View File

@ -0,0 +1,11 @@
---
sidebar_label: '代码提交'
sidebar_position: 3
---
### **1. 代码提交入口**
用户可以通过项目代码库中间的文件下的"上传文件"按键来上传文件。
![](/img/代码库管理/代码提交/上传文件入口.png)<br/>
### **2. 上传文件**
进入上传文件页面后,如下图所示,拖动文件,选择提交变更的分支的单击"创建项目"按键即可完成创建。
![](/img/代码库管理/代码提交/上传文件.png)<br/>

View File

@ -0,0 +1,28 @@
---
sidebar_label: '分支管理'
sidebar_position: 5
---
# 分支管理
### **1. 查看分支**
在代码库栏下,如下图所示,用户可以点击代码库分支从而查看当前项目的所有分支,并且选择对其进行操作。
![分支管理方式1](/img/代码库管理/分支管理/分支管理方式1.jpg)<br/>
### **2. 合并分支**
在"合并请求PR"下点击"新建合并请求"后,
![分支管理方式3](/img/代码库管理/分支管理/分支管理方式3.png)<br/>
如下图所示,用户可以选择源分支与目标分支以及填写分支信息后提交分支合并请求。
![分支管理方式2](/img/代码库管理/分支管理/分支管理方式2.png)<br/>
### **3. 创建分支**
用户可以在代码库页面通过点击分支选择器,然后点击"创建分支"按钮创建新的分支。
创建分支时,需要指定基于哪个已有分支来创建新分支,并为新分支命名。
### **4. 删除分支**
在分支列表页面,对于非保护分支,用户可以通过点击分支右侧的删除按钮来删除不再需要的分支。
需要注意的是,删除分支操作不可逆,请确保分支上的工作已经合并到主分支或已不再需要。
### **5. 分支保护**
对于重要的分支(如主分支),项目管理员可以设置分支保护规则,防止意外删除或直接推送代码。
分支保护可以在项目设置中的"分支保护"选项中配置。

Some files were not shown because too many files have changed in this diff Show More