Open Deboprk opened 1 month ago
Ubuntu22
Create dummy Job using below pipeline script( This job will be called using the other job )
pipeline { agent any stages { stage('Hello') { steps { script{ if ("${params.StatusChoice}" == "Fail"){ error("Failing Job") } if ("${params.StatusChoice}" == "Unstable"){ unstable("unstable Job") } } } } } }
Create Test Job using below pipeline script
pipeline { agent any stages { stage('Stage 1') { steps { echo 'This is stage 1' } } stage('Parallel Stage') { steps { script { LinkedHashMap parallelStages = [:] for (int i = 0; i < 3; i++) { def stageName = "Stage P-${i}" parallelStages[stageName] = { script { def stageStatus="Pass" if ("${stageName}" == "Stage P-0") { sh "sleep 30" } if ("${stageName}" == "Stage P-1") { println("At stage 2") stageStatus = "Fail" } if ("${stageName}" == "Stage P-2") { println("At stage 3") stageStatus = "Unstable" } def childJobBuild = build( job: "dummy", propagate: false, wait: true, parameters: [ string(name: 'StatusChoice', value: "${stageStatus}") ] ) if (childJobBuild.result == "ABORTED" || childJobBuild.result == "FAILURE" ) { catchError(stageResult: 'FAILURE'){ error("${childJobBuild.displayName} STATUS: ${childJobBuild.result}") } } if (childJobBuild.result == "UNSTABLE") { catchError(stageResult: 'UNSTABLE'){ unstable("${childJobBuild.displayName} STATUS: ${childJobBuild.result}") } } } } } parallel parallelStages } } } } }
At runtime the all stages should be updated
Initially all stages are shown passed even though there are failures only after pipeline execution completes the stages are shown correctly.
While Other stages are running:
After all the stages are completed
No response
Jenkins and plugins versions report
Environment
```text Jenkins 2.440.2 Pipeline Graph View Plugin Version243.vc9e11fec486a_ ```What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu22
Reproduction steps
Create dummy Job using below pipeline script( This job will be called using the other job )
Create Test Job using below pipeline script
Expected Results
At runtime the all stages should be updated
Actual Results
Initially all stages are shown passed even though there are failures only after pipeline execution completes the stages are shown correctly.
While Other stages are running:
After all the stages are completed
Anything else?
No response
Are you interested in contributing a fix?
No response