I'm running a groovy script using the build flow plugin, the thing is that i'm getting erros each time one of the builds hasn't succeed when trying to run the next build, this is my script:
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"])
How can i control my this process, i'm not sure that using the build status (FAIL/SUCCESS) is quite efficient with a lot of conditions. Is there any way to stop the procees if one of the builds is failing.