I have 3 pre job defined in Jenkins file that i want to run in sequence . Like test1 should execute after test job is completed and test2 should execute after test1 is completed
Currently i read this job in while loop and will trigger in parallel and it works fine
in scripted pipeline how can i check the status of the job and wait for it until that job is completed so basically i will need to keep on polling the status of the 1st job and move to 2nd job when 1st one is completed
"preDeployJobs" : {
"devl" : [
["Deploy/test_prejob:[parameters: [string(name: 'BUILD_ID_PARAM', value:'%UCD_BUILD_DISPLAY_NAME%')]]"],
["Deploy/test1_prejob:[parameters: [string(name: 'BUILD_ID_PARAM', value:'%UCD_BUILD_DISPLAY_NAME%')]]"],
["Deploy/test2_prejob:[parameters: [string(name: 'BUILD_ID_PARAM', value:'%UCD_BUILD_DISPLAY_NAME%')]]"]
]
}