版本号与功能一一对应:小程序线功能停在 v1.0.2,镜像 tag 也停在 v1.0.2, 平台后续发 v1.0.5 时它不动。 - deploy/docker-compose.yml:app-server / app-web 两行回退 v1.0.2 - Makefile:IMAGE_MAP 增加第 5 列「固定版本」,app 两行填 v1.0.2, 本地构建与 CI 行为一致 - 根 README:新增「小程序线是独立版本线」说明 - app/README.md:标注本目录对应 v1.0.2,不跟随平台 tag - 文档:deploy/README 版本表、build-image 的 tag 表与说明、 offline / prerequisites / configuration 示例 tag 全部回退 v1.0.2 CI 侧由 Jenkins 流水线的 PIN 表(app|v1.0.2)保证:tag 构建自动跳过 app, 需要重建时单独触发 SERVICES=app VERSION=v1.0.2。
This commit is contained in:
@@ -15,20 +15,21 @@ BASE_REGISTRY ?= docker.io/library
|
|||||||
|
|
||||||
GO_MODULES := admin-svr/server app/server bot onelink-mock openapi sms upstream-chan upstream-proxy worker-svr
|
GO_MODULES := admin-svr/server app/server bot onelink-mock openapi sms upstream-chan upstream-proxy worker-svr
|
||||||
|
|
||||||
# 目录|镜像名|构建上下文|Dockerfile
|
# 目录|镜像名|构建上下文|Dockerfile|固定版本(留空=跟随 VERSION)
|
||||||
|
# 小程序线 app 固定 v1.0.2:版本号与功能一一对应,平台发新 tag 时不跟着动。
|
||||||
IMAGE_MAP := \
|
IMAGE_MAP := \
|
||||||
admin-svr|iotlcm-admin-svr|admin-svr/server|build/Dockerfile \
|
admin-svr|iotlcm-admin-svr|admin-svr/server|build/Dockerfile| \
|
||||||
admin-ui|iotlcm-admin-ui|admin-ui|vue/build/Dockerfile \
|
admin-ui|iotlcm-admin-ui|admin-ui|vue/build/Dockerfile| \
|
||||||
openapi|iotlcm-openapi|openapi|build/Dockerfile \
|
openapi|iotlcm-openapi|openapi|build/Dockerfile| \
|
||||||
worker-svr|iotlcm-worker-svr|worker-svr|build/Dockerfile \
|
worker-svr|iotlcm-worker-svr|worker-svr|build/Dockerfile| \
|
||||||
upstream-chan|iotlcm-upstream-chan|upstream-chan|build/Dockerfile \
|
upstream-chan|iotlcm-upstream-chan|upstream-chan|build/Dockerfile| \
|
||||||
upstream-proxy|iotlcm-upstream-proxy|upstream-proxy|build/Dockerfile \
|
upstream-proxy|iotlcm-upstream-proxy|upstream-proxy|build/Dockerfile| \
|
||||||
app|iotlcm-app-server|app/server|Dockerfile \
|
app|iotlcm-app-server|app/server|Dockerfile|v1.0.2 \
|
||||||
app|iotlcm-app-web|app/app|Dockerfile \
|
app|iotlcm-app-web|app/app|Dockerfile|v1.0.2 \
|
||||||
sms|iotlcm-sms|sms|build/Dockerfile \
|
sms|iotlcm-sms|sms|build/Dockerfile| \
|
||||||
bot|iotlcm-bot|bot|Dockerfile \
|
bot|iotlcm-bot|bot|Dockerfile| \
|
||||||
docs|iotlcm-docs|docs|Dockerfile \
|
docs|iotlcm-docs|docs|Dockerfile| \
|
||||||
onelink-mock|iotlcm-onelink-mock|onelink-mock|Dockerfile
|
onelink-mock|iotlcm-onelink-mock|onelink-mock|Dockerfile|
|
||||||
|
|
||||||
.PHONY: help build test images docs clean
|
.PHONY: help build test images docs clean
|
||||||
|
|
||||||
@@ -50,15 +51,16 @@ test:
|
|||||||
|
|
||||||
images:
|
images:
|
||||||
@set -e; echo "镜像前缀: $(REGISTRY) 版本: $(VERSION)"; \
|
@set -e; echo "镜像前缀: $(REGISTRY) 版本: $(VERSION)"; \
|
||||||
echo "$(IMAGE_MAP)" | tr ' ' '\n' | while IFS='|' read -r dir img ctx df; do \
|
echo "$(IMAGE_MAP)" | tr ' ' '\n' | while IFS='|' read -r dir img ctx df pin; do \
|
||||||
[ -z "$$dir" ] && continue; \
|
[ -z "$$dir" ] && continue; \
|
||||||
echo ""; echo "==> $$img:$$VERSION (context=$$ctx dockerfile=$$df)"; \
|
v="$${pin:-$(VERSION)}"; \
|
||||||
|
echo ""; echo "==> $$img:$$v (context=$$ctx dockerfile=$$df$${pin:+ [固定版本]})"; \
|
||||||
docker build -f "$$ctx/$$df" \
|
docker build -f "$$ctx/$$df" \
|
||||||
--build-arg BASE_REGISTRY="$(BASE_REGISTRY)" \
|
--build-arg BASE_REGISTRY="$(BASE_REGISTRY)" \
|
||||||
--build-arg BuildVersion="$(VERSION)" \
|
--build-arg BuildVersion="$$v" \
|
||||||
--build-arg CommitID="$$(git rev-parse --short=7 HEAD)" \
|
--build-arg CommitID="$$(git rev-parse --short=7 HEAD)" \
|
||||||
--build-arg BuildTime="$$(date -u +%FT%TZ)" \
|
--build-arg BuildTime="$$(date -u +%FT%TZ)" \
|
||||||
-t "$(REGISTRY):$$img-$(VERSION)" "$$ctx"; \
|
-t "$(REGISTRY):$$img-$$v" "$$ctx"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
|
|||||||
@@ -74,7 +74,17 @@ make images # 本地构建全部镜像
|
|||||||
└─ 仓库 ┘ └─ 服务名 ─┘└版本┘
|
└─ 仓库 ┘ └─ 服务名 ─┘└版本┘
|
||||||
```
|
```
|
||||||
|
|
||||||
打 `v*` tag 会经由内网 CI 构建全部镜像并推送,见 `.gitea/workflows/`。
|
打 `v*` tag 会经由内网 CI 构建镜像并推送,见 `.gitea/workflows/`。
|
||||||
|
|
||||||
|
**小程序线(`app/`)是独立版本线**,不跟随平台 tag:
|
||||||
|
|
||||||
|
| 服务 | 当前版本 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 其余业务服务 | `v1.0.4` | 跟随平台 tag |
|
||||||
|
| `iotlcm-app-server` / `iotlcm-app-web` | **`v1.0.2`** | 直连版本号与功能一一对应,功能未变就不动版本 |
|
||||||
|
|
||||||
|
CI 里用一张 `PIN` 表维护这条规则(`app|v1.0.2`):平台发新 tag 时自动跳过 app,需要重建小程序线时单独触发
|
||||||
|
`SERVICES=app VERSION=v1.0.2`。
|
||||||
|
|
||||||
## 许可
|
## 许可
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
iotLCM 物联网卡全生命周期管理平台的**小程序端 + 用户端服务**。
|
iotLCM 物联网卡全生命周期管理平台的**小程序端 + 用户端服务**。
|
||||||
|
|
||||||
|
> **版本线独立**:本目录对应小程序线的 **v1.0.2**,不跟随平台 tag(平台当前为 v1.0.4)。
|
||||||
|
> 功能变更时才提升本线版本,镜像 tag 仍为 `iotlcm-app-server-<版本>` / `iotlcm-app-web-<版本>`。
|
||||||
|
|
||||||
- `app/` —— uni-app 小程序前端(基于 [unibest](https://github.com/unibest-tech/unibest),MIT)
|
- `app/` —— uni-app 小程序前端(基于 [unibest](https://github.com/unibest-tech/unibest),MIT)
|
||||||
- `server/` —— 用户端 GoFrame 服务(基于 XiuAdmin 框架,Apache-2.0)
|
- `server/` —— 用户端 GoFrame 服务(基于 XiuAdmin 框架,Apache-2.0)
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -49,12 +49,19 @@ docker compose --profile with-nginx up -d # 自带反向代理
|
|||||||
crpi-.../iotlcm/iotlcm:mysql-8.0
|
crpi-.../iotlcm/iotlcm:mysql-8.0
|
||||||
crpi-.../iotlcm/iotlcm:redis-7.2
|
crpi-.../iotlcm/iotlcm:redis-7.2
|
||||||
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||||
```
|
```
|
||||||
|
|
||||||
tag 格式统一为 **`<服务名>-<版本>`**。
|
tag 格式统一为 **`<服务名>-<版本>`**。
|
||||||
|
|
||||||
当前业务版本:全部服务为 `v1.0.4`(单仓统一版本号 —— 平台 v1.0.4 发布包含全部服务)。
|
当前业务版本:
|
||||||
|
|
||||||
|
| 服务 | 版本 |
|
||||||
|
| --- | --- |
|
||||||
|
| 除 app 线外的全部业务服务 | `v1.0.4` |
|
||||||
|
| `iotlcm-app-server` / `iotlcm-app-web` | **`v1.0.2`**(小程序线独立版本,不跟随平台 tag) |
|
||||||
|
|
||||||
|
> 版本号与功能一一对应:小程序线的功能停在 v1.0.2,因此镜像 tag 也停在 v1.0.2;平台后续发 v1.0.5 时它依然不动。
|
||||||
|
|
||||||
升级时在 `docker-compose.yml` 中同步更新 tag 的版本部分,不要改用 `latest`。
|
升级时在 `docker-compose.yml` 中同步更新 tag 的版本部分,不要改用 `latest`。
|
||||||
|
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
app-server:
|
app-server:
|
||||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.4'
|
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.2'
|
||||||
container_name: iotlcm-app-server
|
container_name: iotlcm-app-server
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@@ -306,7 +306,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
app-web:
|
app-web:
|
||||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-web-v1.0.4'
|
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-web-v1.0.2'
|
||||||
container_name: iotlcm-app-web
|
container_name: iotlcm-app-web
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -139,8 +139,8 @@ docker build --build-arg GOPROXY=https://goproxy.cn,direct -t ... .
|
|||||||
| admin-svr | `iotlcm-admin-svr-<TAG>` | `.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4` |
|
| admin-svr | `iotlcm-admin-svr-<TAG>` | `.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4` |
|
||||||
| admin-ui | `iotlcm-admin-ui-<TAG>` | `.../iotlcm/iotlcm:iotlcm-admin-ui-v1.0.4` |
|
| admin-ui | `iotlcm-admin-ui-<TAG>` | `.../iotlcm/iotlcm:iotlcm-admin-ui-v1.0.4` |
|
||||||
| openapi | `iotlcm-openapi-<TAG>` | `.../iotlcm/iotlcm:iotlcm-openapi-v1.0.4` |
|
| openapi | `iotlcm-openapi-<TAG>` | `.../iotlcm/iotlcm:iotlcm-openapi-v1.0.4` |
|
||||||
| app-server | `iotlcm-app-server-<TAG>` | `.../iotlcm/iotlcm:iotlcm-app-server-v1.0.4` |
|
| app-server | `iotlcm-app-server-<TAG>` | `.../iotlcm/iotlcm:iotlcm-app-server-v1.0.2` |
|
||||||
| app-web | `iotlcm-app-web-<TAG>` | `.../iotlcm/iotlcm:iotlcm-app-web-v1.0.4` |
|
| app-web | `iotlcm-app-web-<TAG>` | `.../iotlcm/iotlcm:iotlcm-app-web-v1.0.2` |
|
||||||
| upstream-chan | `iotlcm-upstream-chan-<TAG>` | `.../iotlcm/iotlcm:iotlcm-upstream-chan-v1.0.4` |
|
| upstream-chan | `iotlcm-upstream-chan-<TAG>` | `.../iotlcm/iotlcm:iotlcm-upstream-chan-v1.0.4` |
|
||||||
| upstream-proxy | `iotlcm-upstream-proxy-<TAG>` | `.../iotlcm/iotlcm:iotlcm-upstream-proxy-v1.0.4` |
|
| upstream-proxy | `iotlcm-upstream-proxy-<TAG>` | `.../iotlcm/iotlcm:iotlcm-upstream-proxy-v1.0.4` |
|
||||||
| worker-svr | `iotlcm-worker-svr-<TAG>` | `.../iotlcm/iotlcm:iotlcm-worker-svr-v1.0.4` |
|
| worker-svr | `iotlcm-worker-svr-<TAG>` | `.../iotlcm/iotlcm:iotlcm-worker-svr-v1.0.4` |
|
||||||
@@ -151,6 +151,11 @@ docker build --build-arg GOPROXY=https://goproxy.cn,direct -t ... .
|
|||||||
|
|
||||||
基础组件(`mysql`、`redis`、`rabbitmq`、`consul`、`nginx`)不需要构建,从上游同步到同一仓库即可,tag 为 `<组件>-<版本>`,见下节。
|
基础组件(`mysql`、`redis`、`rabbitmq`、`consul`、`nginx`)不需要构建,从上游同步到同一仓库即可,tag 为 `<组件>-<版本>`,见下节。
|
||||||
|
|
||||||
|
::: tip app 线是独立版本
|
||||||
|
`iotlcm-app-server` 与 `iotlcm-app-web` 属于**小程序线**,版本号与平台 tag 解耦:平台发 v1.0.4 时它们仍是 `v1.0.2`。
|
||||||
|
自建镜像时按 `iotlcm-app-<x>-v1.0.2` 命名,不要跟着平台版本走。
|
||||||
|
:::
|
||||||
|
|
||||||
::: warning tag 必须带上服务名
|
::: warning tag 必须带上服务名
|
||||||
同一个仓库里 tag 不能重复。只用版本号(如 `v1.0.4`)会让 12 个服务互相覆盖,因此 tag 固定为 `<服务名>-<版本>`。
|
同一个仓库里 tag 不能重复。只用版本号(如 `v1.0.4`)会让 12 个服务互相覆盖,因此 tag 固定为 `<服务名>-<版本>`。
|
||||||
:::
|
:::
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ image: 'crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4'
|
|||||||
| tag 形式 | 示例 |
|
| tag 形式 | 示例 |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 基础组件:`<组件>-<版本>` | `mysql-8.0`、`redis-7.2`、`nginx-1.30` |
|
| 基础组件:`<组件>-<版本>` | `mysql-8.0`、`redis-7.2`、`nginx-1.30` |
|
||||||
| 业务服务:`<服务>-<版本>` | `iotlcm-admin-svr-v1.0.4`、`iotlcm-app-server-v1.0.4` |
|
| 业务服务:`<服务>-<版本>` | `iotlcm-admin-svr-v1.0.4`、`iotlcm-app-server-v1.0.2` |
|
||||||
|
|
||||||
改用自有仓库时,全局替换 Registry 前缀即可。
|
改用自有仓库时,全局替换 Registry 前缀即可。
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ docker compose config --images | sort -u
|
|||||||
```text
|
```text
|
||||||
registry.example.com/iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
registry.example.com/iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||||
registry.example.com/iotlcm/iotlcm:iotlcm-admin-ui-v1.0.4
|
registry.example.com/iotlcm/iotlcm:iotlcm-admin-ui-v1.0.4
|
||||||
registry.example.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
registry.example.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||||
...
|
...
|
||||||
registry.example.com/iotlcm/iotlcm:mysql-8.0
|
registry.example.com/iotlcm/iotlcm:mysql-8.0
|
||||||
registry.example.com/iotlcm/iotlcm:redis-7.2
|
registry.example.com/iotlcm/iotlcm:redis-7.2
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ crpi-.../iotlcm/iotlcm:mysql-8.0
|
|||||||
crpi-.../iotlcm/iotlcm:redis-7.2
|
crpi-.../iotlcm/iotlcm:redis-7.2
|
||||||
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||||
crpi-.../iotlcm/iotlcm:iotlcm-openapi-v1.0.4
|
crpi-.../iotlcm/iotlcm:iotlcm-openapi-v1.0.4
|
||||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||||
```
|
```
|
||||||
|
|
||||||
tag 格式统一为 **`<服务名>-<版本>`**。
|
tag 格式统一为 **`<服务名>-<版本>`**。
|
||||||
|
|||||||
Reference in New Issue
Block a user