@tmpxinchen/tmp1 1.0.53 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/models.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://pi.dev/schemas/models.schema.json",
3
+ "providers": {
4
+ "company": {
5
+ "name": "公司内网模型网关",
6
+ "baseUrl": "https://gw.内网域名/v1",
7
+ "apiKey": "$COMPANY_API_KEY",
8
+ "api": "openai-completions",
9
+ "models": [
10
+ {
11
+ "id": "qwen3-235b-instruct",
12
+ "name": "Qwen3 235B Instruct",
13
+ "reasoning": false,
14
+ "input": ["text"],
15
+ "contextWindow": 128000,
16
+ "maxTokens": 8192,
17
+ "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
18
+ }
19
+ ]
20
+ }
21
+ }
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmpxinchen/tmp1",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "gitlab-ce-18.11.12.tar transfer chunk 44/44",
5
5
  "license": "ISC",
6
6
  "author": "xinchen12"
@@ -1,220 +0,0 @@
1
- # ai-coding-pilot:只涉及 gitlab-runner-helper 镜像的改动
2
-
3
- > 本文只包含 helper 镜像相关修改,不涉及其他脚本逻辑。
4
-
5
- 目标:让 GitLab Runner 的 Docker executor 使用本地/公司 registry 中已有的 helper 镜像,避免 CI 作业在 preparation 阶段因缺少 helper 镜像而失败。
6
-
7
- ---
8
-
9
- ## 1. `.env` 和 `.env.example`
10
-
11
- 在 `RUNNER_IMAGE` 下面增加:
12
-
13
- ```bash
14
- # GitLab Runner Docker executor 的 helper 镜像(与 runner 版本匹配,x86_64)
15
- RUNNER_HELPER_IMAGE=gitlab/gitlab-runner-helper:x86_64-v18.11.4
16
- ```
17
-
18
- 如果 helper 镜像放在公司 registry,改成实际路径,例如:
19
-
20
- ```bash
21
- RUNNER_HELPER_IMAGE=公司registry/gitlab-runner-helper:x86_64-v18.11.4
22
- ```
23
-
24
- ---
25
-
26
- ## 2. `start.sh`:镜像检查加入 helper
27
-
28
- 原来的镜像检查类似:
29
-
30
- ```bash
31
- missing=0
32
- for img in \
33
- "$(grep -E '^GITLAB_IMAGE=' .env | cut -d= -f2)" \
34
- "$(grep -E '^RUNNER_IMAGE=' .env | cut -d= -f2)" \
35
- "$(grep -E '^OPENCODE_IMAGE=' .env | cut -d= -f2)" \
36
- "$(grep -E '^MAVEN_IMAGE=' .env | cut -d= -f2)"; do
37
- ```
38
-
39
- 修改为:
40
-
41
- ```bash
42
- missing=0
43
- RUNNER_HELPER_IMAGE=$(grep -E '^RUNNER_HELPER_IMAGE=' .env | cut -d= -f2)
44
- RUNNER_HELPER_IMAGE=${RUNNER_HELPER_IMAGE:-gitlab/gitlab-runner-helper:x86_64-v18.11.4}
45
-
46
- for img in \
47
- "$(grep -E '^GITLAB_IMAGE=' .env | cut -d= -f2)" \
48
- "$(grep -E '^RUNNER_IMAGE=' .env | cut -d= -f2)" \
49
- "$(grep -E '^OPENCODE_IMAGE=' .env | cut -d= -f2)" \
50
- "$(grep -E '^MAVEN_IMAGE=' .env | cut -d= -f2)" \
51
- "$RUNNER_HELPER_IMAGE"; do
52
- [ -n "$img" ] || continue
53
- docker image inspect "$img" >/dev/null 2>&1 || {
54
- echo "缺镜像 $img"
55
- missing=1
56
- }
57
- done
58
- ```
59
-
60
- 作用:缺少 helper 镜像时,`start.sh` 会直接提示,不会等到 CI 作业才失败。
61
-
62
- ---
63
-
64
- ## 3. `scripts/gitlab-init.sh`:注册 runner 时指定 helper 镜像
65
-
66
- 在 `gitlab-runner register` 的参数里,找到:
67
-
68
- ```bash
69
- --docker-image "${MAVEN_IMAGE:-maven:3.9-eclipse-temurin-8}" \
70
- ```
71
-
72
- 在它下面增加:
73
-
74
- ```bash
75
- --docker-helper-image "${RUNNER_HELPER_IMAGE:-gitlab/gitlab-runner-helper:x86_64-v18.11.4}" \
76
- ```
77
-
78
- 不要动其他参数。
79
-
80
- ---
81
-
82
- ## 4. `scripts/selfcheck.sh`:镜像检查加入 helper
83
-
84
- 找到镜像循环,类似:
85
-
86
- ```bash
87
- for img in "${GITLAB_IMAGE:-...}" \
88
- "${RUNNER_IMAGE:-...}" \
89
- "${OPENCODE_IMAGE:-...}" \
90
- "$MAVEN_IMAGE"; do
91
- ```
92
-
93
- 在最后增加:
94
-
95
- ```bash
96
- "${RUNNER_HELPER_IMAGE:-gitlab/gitlab-runner-helper:x86_64-v18.11.4}"; do
97
- ```
98
-
99
- ---
100
-
101
- ## 5. 文档同步(可选)
102
-
103
- ### README
104
-
105
- 镜像清单增加一行:
106
-
107
- ```text
108
- | `gitlab/gitlab-runner-helper:x86_64-v18.11.4` | 约 20 MB | 约 50 MB | Docker executor 的 helper 容器(clone/artifacts)|
109
- ```
110
-
111
- 基础镜像数量从 4 个改为 5 个(含 helper)。
112
-
113
- ### `docs/操作手册.md`
114
-
115
- 把:
116
-
117
- ```text
118
- - 4 个基础镜像已在宿主机本地;
119
- ```
120
-
121
- 改成:
122
-
123
- ```text
124
- - 5 个基础镜像已在宿主机本地(含 gitlab-runner-helper);
125
- ```
126
-
127
- ### `docs/自动化流程.md`
128
-
129
- 准备镜像部分增加:
130
-
131
- ```bash
132
- docker pull gitlab/gitlab-runner-helper:x86_64-v18.11.4
133
- ```
134
-
135
- ---
136
-
137
- ## 6. helper 镜像导入
138
-
139
- 同目录下已经有离线包:
140
-
141
- ```text
142
- gitlab-runner-helper_x86_64-v18.11.4.tar.gz
143
- ```
144
-
145
- 内网导入:
146
-
147
- ```bash
148
- docker load -i gitlab-runner-helper_x86_64-v18.11.4.tar.gz
149
- ```
150
-
151
- 确认:
152
-
153
- ```bash
154
- docker images | grep gitlab-runner-helper
155
- ```
156
-
157
- 应看到:
158
-
159
- ```text
160
- gitlab/gitlab-runner-helper:x86_64-v18.11.4
161
- ```
162
-
163
- ---
164
-
165
- ## 7. 已注册旧 runner 的处理
166
-
167
- 如果只是使用默认 helper 镜像名,并且本地已经导入,通常不需要重新注册。
168
-
169
- 如果你把 `RUNNER_HELPER_IMAGE` 改成了公司 registry 路径,需要:
170
-
171
- 1. 重新注册 runner;或
172
- 2. 手工修改:
173
-
174
- ```text
175
- data/runner/config/config.toml
176
- ```
177
-
178
- 在 `[runners.docker]` 下增加:
179
-
180
- ```toml
181
- helper_image = "公司registry/gitlab-runner-helper:x86_64-v18.11.4"
182
- ```
183
-
184
- 然后:
185
-
186
- ```bash
187
- docker restart ai-coding-pilot-runner
188
- ```
189
-
190
- ---
191
-
192
- ## 8. 验收
193
-
194
- ```bash
195
- cd /home/admin/ai-coding-pilot
196
-
197
- bash -n start.sh
198
- bash -n scripts/gitlab-init.sh
199
- bash -n scripts/selfcheck.sh
200
-
201
- grep RUNNER_HELPER_IMAGE .env
202
- docker images | grep gitlab-runner-helper
203
-
204
- ./scripts/selfcheck.sh --pre
205
- ```
206
-
207
- 重点确认:
208
-
209
- - 镜像清单里有 `gitlab/gitlab-runner-helper:x86_64-v18.11.4`;
210
- - `start.sh` 不再报缺 helper;
211
- - CI 作业 preparation 阶段不再尝试拉取 helper 镜像。
212
-
213
- ---
214
-
215
- ## 9. 注意
216
-
217
- - helper 镜像是 Docker executor 必需的,不能用普通 runner 镜像代替;
218
- - `--docker-pull-policy never` 主要约束作业镜像,不能保证 helper 一定存在;
219
- - helper 版本必须和 runner 版本匹配:`v18.11.4`;
220
- - 如果公司 registry 里的标签不同,以 runner 日志报的镜像名为准。