fix(ci): 适配现有 runner 的基础镜像
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
3896320319
commit
aec7e1fd02
|
|
@ -8,18 +8,18 @@ platform:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: postgres:17.12
|
image: postgres:15-alpine
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: verify
|
- name: verify
|
||||||
image: maven:3.9.11-eclipse-temurin-21-alpine
|
image: python:3.13-alpine
|
||||||
environment:
|
environment:
|
||||||
ATLAS_LOCAL_PASSWORD: atlas-ci-example
|
ATLAS_LOCAL_PASSWORD: atlas-ci-example
|
||||||
ATLAS_DELIVERY_PASSWORD: atlas-ci-delivery-example
|
ATLAS_DELIVERY_PASSWORD: atlas-ci-delivery-example
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache python3 postgresql17-client
|
- apk add --no-cache openjdk21-jdk maven postgresql-client
|
||||||
- mvn -B -ntp -f backend/pom.xml verify
|
- mvn -B -ntp -f backend/pom.xml verify
|
||||||
- sh deploy/local/ci-smoke.sh
|
- sh deploy/local/ci-smoke.sh
|
||||||
- name: publish-gateway
|
- name: publish-gateway
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ CREATE DATABASE itematlas_inventory OWNER atlas_inventory;
|
||||||
CREATE DATABASE itematlas_intake OWNER atlas_intake;
|
CREATE DATABASE itematlas_intake OWNER atlas_intake;
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
export SPRING_PROFILES_ACTIVE=local ATLAS_DB_PASSWORD=""
|
export SPRING_PROFILES_ACTIVE=local ATLAS_DB_PASSWORD="" JAVA_TOOL_OPTIONS="-Xmx192m"
|
||||||
ATLAS_DB_USER=atlas_inventory ATLAS_DB_URL=jdbc:postgresql://postgres:5432/itematlas_inventory \
|
ATLAS_DB_USER=atlas_inventory ATLAS_DB_URL=jdbc:postgresql://postgres:5432/itematlas_inventory \
|
||||||
java -jar backend/inventory-service/target/app.jar > /tmp/atlas-inventory.log 2>&1 &
|
java -jar backend/inventory-service/target/app.jar > /tmp/atlas-inventory.log 2>&1 &
|
||||||
service_pids="$!"
|
service_pids="$!"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## 从提交到部署
|
## 从提交到部署
|
||||||
|
|
||||||
1. Gitea 保存代码。Drone `backend-ci` 在常规提交和发布标签上运行 Maven 和 API 冒烟,PostgreSQL 作为流水线服务。发布标签采用 `v*`。标签验证通过后构建并推送三个 ARM64 镜像,镜像标签使用完整提交 SHA。
|
1. Gitea 保存代码。Drone `backend-ci` 在常规提交和发布标签上运行 Java 21、Maven 和 API 冒烟。CI 使用 runner 已缓存的 PostgreSQL 15 镜像做兼容验证,本地和目标部署使用 PostgreSQL 17。发布标签采用 `v*`。标签验证通过后构建并推送三个 ARM64 镜像,镜像标签使用完整提交 SHA。
|
||||||
2. 在 Drone 提升同一个成功构建到 `staging`。部署步骤使用 Helm 3 的 `upgrade --install --atomic --wait`。就绪探针检查应用和数据库,Helm hook 逐个访问 Kubernetes Service。
|
2. 在 Drone 提升同一个成功构建到 `staging`。部署步骤使用 Helm 3 的 `upgrade --install --atomic --wait`。就绪探针检查应用和数据库,Helm hook 逐个访问 Kubernetes Service。
|
||||||
3. 在预发布验证业务请求,再将同一个构建提升到 `production`。正式端口由既有入口配置转发到网关。数据库、Ollama 与 Actuator 保持内部访问。
|
3. 在预发布验证业务请求,再将同一个构建提升到 `production`。正式端口由既有入口配置转发到网关。数据库、Ollama 与 Actuator 保持内部访问。
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue