修复 HK-1 Actions 容器网络
All checks were successful
Java Maven 3.9.9 & JDK 26 CI/CD Pipeline / build-and-deploy (push) Successful in 8m6s
All checks were successful
Java Maven 3.9.9 & JDK 26 CI/CD Pipeline / build-and-deploy (push) Successful in 8m6s
This commit is contained in:
parent
4bff3b8a2f
commit
a6f5ea721d
@ -23,7 +23,7 @@ jobs:
|
||||
# 清空当前工作目录,防止历史残留
|
||||
rm -rf ./*
|
||||
# 利用 Gitea 自动注入的内置变量,动态克隆当前仓库、当前分支、当前提交
|
||||
git clone --depth 1 -b ${{ gitea.ref_name }} http://172.17.0.1:3000/${{ gitea.repository }} .
|
||||
git clone --depth 1 -b ${{ gitea.ref_name }} http://gitea:3000/${{ gitea.repository }} .
|
||||
git checkout ${{ gitea.sha }}
|
||||
|
||||
- name: 2. 触发 Docker 容器内编译与镜像打包
|
||||
@ -62,7 +62,7 @@ jobs:
|
||||
# 循环探活:每隔 5 秒检测一次,最多尝试 15 次(总计 75 秒,给高版本 JVM 充足的预热时间)
|
||||
for i in 1 2 3 4 5 6; do
|
||||
# 发送轻量级请求,只要服务响应了(无论是200还是Spring默认的404/无路由),都证明 Tomcat/Netty 已拉起
|
||||
if wget -q --spider http://172.17.0.1:${APP_PORT}/; then
|
||||
if wget -q --spider http://${CONTAINER_NAME}:${APP_PORT}/; then
|
||||
echo "✅ [SUCCESS] 探活成功!Java 26 服务已成功拉起。"
|
||||
echo "🧹 开始安全地清理历史无用镜像及过期构建缓存..."
|
||||
docker image prune -f
|
||||
|
||||
@ -16,10 +16,11 @@ cache:
|
||||
enabled: false
|
||||
|
||||
container:
|
||||
network: bridge
|
||||
network: tracecd-net
|
||||
privileged: false
|
||||
options: "-v /opt/tracecd/app.env:/opt/tracecd/app.env:ro"
|
||||
valid_volumes: []
|
||||
valid_volumes:
|
||||
- /opt/tracecd/app.env
|
||||
docker_host: ""
|
||||
force_pull: false
|
||||
force_rebuild: false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user