Enable Jenkins global timestamps for production pipelines

This commit is contained in:
2026-05-02 19:43:17 +08:00
parent 06d6f7716e
commit 0c9e58b75a
11 changed files with 1 additions and 11 deletions

View File

@@ -248,7 +248,7 @@ Jenkins controller 与 Linux agent 看到的 Git 服务地址不同,必须拆
构建流水线运行在当前 Linux agent 的脱敏 label expression `linux && genarrative-build`。发布、导入导出和服务器配置流水线通过 `DEPLOY_TARGET` 映射到 Linux-only 脱敏部署表达式;其中 `development` 映射到当前 Linux 开发/构建/开发部署 agent 的 `linux && genarrative-build``release` 映射到独立 Linux 生产部署 agent 的 `linux && genarrative-release-deploy`,不能复用当前开发/构建/开发部署 agent。真实机器名、IP 和带 IP 的 Jenkins label 只允许留在 Jenkins 节点连接配置中,不能暴露为 Job 参数默认值、调度标签或文档推荐值。
发布流水线通过 Jenkins `copyArtifacts(...)` 从对应构建 Job 获取归档产物,因此 Jenkins 需要安装并启用 Copy Artifact 插件。数据库导入流水线的手动上传模式使用 `stashedFile` 文件参数,因此 Jenkins 还需要安装并启用 File Parameter 插件。所有生产 Jenkinsfile 保留 `timestamps()` 以保证日志可审计Jenkins 需要安装并启用 Timestamper 插件。生产发布不能退回到读取构建 workspace 本地目录的旧模式。
发布流水线通过 Jenkins `copyArtifacts(...)` 从对应构建 Job 获取归档产物,因此 Jenkins 需要安装并启用 Copy Artifact 插件。数据库导入流水线的手动上传模式使用 `stashedFile` 文件参数,因此 Jenkins 还需要安装并启用 File Parameter 插件。所有生产 Pipeline 日志必须带时间戳以便审计Jenkins 需要安装 Timestamper 插件,并在全局配置中启用 `Enabled for all Pipeline builds`。生产发布不能退回到读取构建 workspace 本地目录的旧模式。
所有发布流水线必须提供 `DEPLOY_TARGET` 参数,用于选择逻辑部署目标:

View File

@@ -6,7 +6,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -6,7 +6,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -6,7 +6,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}

View File

@@ -4,7 +4,6 @@ pipeline {
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
wrap([$class: 'TimestamperBuildWrapper'])
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
}