更新
This commit is contained in:
@@ -295,7 +295,18 @@ def call(String orgName) { // Jenkins Pipeline 的入口方法通常命名为 ca
|
||||
echo "=== 管道执行完成 ==="
|
||||
echo "完成时间: ${new Date()}" // 打印流水线结束的时间
|
||||
// 清理工作空间,删除当前流水线运行产生的所有文件,释放磁盘空间
|
||||
cleanWs()
|
||||
//cleanWs()
|
||||
cleanWs(
|
||||
deleteDirs: true,
|
||||
notFailBuild: true,
|
||||
patterns: [
|
||||
[pattern: '**/target/**', type: 'INCLUDE'],
|
||||
[pattern: '**/dist/**', type: 'INCLUDE'],
|
||||
[pattern: '**/node_modules/**', type: 'INCLUDE'],
|
||||
[pattern: '**/__pycache__/**', type: 'INCLUDE'],
|
||||
[pattern: '**/*.log', type: 'INCLUDE']
|
||||
]
|
||||
)
|
||||
script {
|
||||
echo "构建完成,状态: ${currentBuild.currentResult}" // 打印最终构建状态
|
||||
// 调用阶段服务的方法,收集所有阶段的执行信息(开始时间、持续时间、状态),可能用于通知或报告
|
||||
|
||||
Reference in New Issue
Block a user