chore: 移除Jenkins配置

This commit is contained in:
2026-08-02 10:21:05 +08:00
parent a87fdba4cc
commit 4dc75175e6
3 changed files with 2 additions and 91 deletions
+2 -3
View File
@@ -4,8 +4,7 @@
## 当前部署方式 ## 当前部署方式
- **Jenkinsfile / Jenkinsfile-dev**:历史方案,已不再作为主路径 - **当前方案**Gitea Actions`.gitea/workflows/deploy.yml`
- **现行方案**Gitea Actions`.gitea/workflows/deploy.yml`
手动 `workflow_dispatch` → 构建镜像 → 推私有 Registry → `kubectl set image` 到 K8s 手动 `workflow_dispatch` → 构建镜像 → 推私有 Registry → `kubectl set image` 到 K8s
## 分支 ↔ 环境约定(已写入 workflow 强制校验) ## 分支 ↔ 环境约定(已写入 workflow 强制校验)
@@ -69,4 +68,4 @@ Registry: `192.168.123.199:5000`
--- ---
**备注**: 主路径为 Gitea Actions + K8sJenkins 配置可保留作参考,勿与现行流程混用 **备注**: 部署流程为 Gitea Actions + K8s,勿再使用旧 Jenkins 容器部署
Vendored
-47
View File
@@ -1,47 +0,0 @@
pipeline {
agent none
environment {
IMAGE_NAME = "lpt-fe:${env.GIT_COMMIT?.take(8) ?: '0.0'}"
CONTAINER_NAME = 'LPT_FE'
CONTAINER_PORT = '80'
}
stages {
stage('构建 Docker 镜像') {
agent any
steps {
sh 'docker build --build-arg BUILD_MODE=production -t $IMAGE_NAME .'
}
}
stage('部署容器') {
agent any
steps {
sh '''
docker network create traefik-public || true
docker rm -f $CONTAINER_NAME || true
docker run -d --name $CONTAINER_NAME \\
--network traefik-public \\
--label "traefik.enable=true" \\
--label "traefik.docker.network=traefik-public" \\
--label 'traefik.http.routers.lpt-fe.rule=Host(`lpt.cat-shark.xyz`)' \\
--label "traefik.http.routers.lpt-fe.entrypoints=websecure" \\
--label "traefik.http.routers.lpt-fe.tls.certresolver=le" \\
--label "traefik.http.routers.lpt-fe.service=lpt-fe" \\
--label "traefik.http.services.lpt-fe.loadbalancer.server.port=$CONTAINER_PORT" \\
$IMAGE_NAME
'''
}
}
stage('健康检查') {
agent any
steps {
sh 'sleep 15 && docker exec $CONTAINER_NAME curl -f http://localhost:$CONTAINER_PORT/ || (docker logs $CONTAINER_NAME && exit 1)'
}
}
stage('清理旧镜像') {
agent any
steps {
sh 'docker image prune -af --filter "until=168h" || true'
}
}
}
}
-41
View File
@@ -1,41 +0,0 @@
pipeline {
agent none
environment {
IMAGE_NAME = 'lpt-fe-dev:0.0'
CONTAINER_NAME = 'LPT_FE-dev'
CONTAINER_PORT = '80'
}
stages {
stage('构建 Docker 镜像') {
agent any
steps {
sh 'docker build --build-arg BUILD_MODE=dev -t $IMAGE_NAME .'
}
}
stage('部署容器') {
agent any
steps {
sh '''
docker network create traefik-public || true
docker rm -f $CONTAINER_NAME || true
docker run -d --name $CONTAINER_NAME \\
--network traefik-public \\
--label "traefik.enable=true" \\
--label "traefik.docker.network=traefik-public" \\
--label 'traefik.http.routers.lpt-fe-dev.rule=Host(`lpt-dev.cat-shark.xyz`)' \\
--label "traefik.http.routers.lpt-fe-dev.entrypoints=websecure" \\
--label "traefik.http.routers.lpt-fe-dev.tls.certresolver=le" \\
--label "traefik.http.routers.lpt-fe-dev.service=lpt-fe-dev" \\
--label "traefik.http.services.lpt-fe-dev.loadbalancer.server.port=$CONTAINER_PORT" \\
$IMAGE_NAME
'''
}
}
stage('健康检查') {
agent any
steps {
sh 'sleep 5 && docker exec $CONTAINER_NAME curl -f http://localhost:$CONTAINER_PORT/ || (docker logs $CONTAINER_NAME && exit 1)'
}
}
}
}