我正在使用构建流程插件运行一个 groovy 脚本,问题是每次尝试运行下一个构建时其中一个构建没有成功时,我都会遇到错误,这是我的脚本:
def RavenAppToBuild = params["project"] + "_Flow"
out.println "Building " + RavenAppToBuild
b = build(RavenAppToBuild, PlatformProject: params["PlatformProject"], PLATFORM_PATH: params["PLATFORM_PATH"])
def ProjectName= b.environment.get("JOB_NAME")
out.println "The application job name is : " + ProjectName
out.println "Updating the platdorm recommended link..."
build ("Update_Platform_Recommended_Link_Flow", PlatformProject: params["PlatformProject"] , NewBaseline: params["NewBaseline"], ProjectName: ProjectName )
out.println "Recommending ive baseline..."
build ("recommend_ive_baseline_Flow", PlatformProject: params["PlatformProject"], ProjectName: ProjectName )
def chassisToRecommend = params["PlatformProject"] + "_Chassis_Recommended_Flow"
out.println "Building " + chassisToRecommend
build (chassisToRecommend, ProjectName: ProjectName)
out.println "Running release notes job"
build ("release_notes_Flow", PlatformProject: params["PlatformProject"], BaselineToCompare: params["BaselineToCompare"])
我如何控制我的这个过程,我不确定在很多条件下使用构建状态(失败/成功)是否非常有效。如果其中一个构建失败,是否有任何方法可以停止进程。