Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
None
-
-
1.0-beta-1
Description
EDIT (mic): this seems only in Kyoto's config for now (still worth investigating..) - not block scoped stages.
This pipeline has failed but the stage is reported as successful
Jenkinsfile example
pipeline { agent docker:'java' stages { stage ('Build') { sh 'mvn clean source:jar package' } stage ('Browser Tests') { parallel ( 'Firefox': { sh "echo 'setting up selenium environment'" sh 'sleep 5000' }, 'Safari': { sh "echo 'setting up selenium environment'" sh 'sleep 5000' }, 'Chrome': { sh "echo 'setting up selenium environment'" sh 'sleep 3000' }, 'Internet Explorer': { sh "echo 'setting up selenium environment'" sh 'sleep 2000' } ) } stage ('Static Analysis') { sh 'mvn findbugs:findbugs' } stage ('Package') { sh 'mvn source:jar package -Dmaven.test.skip' } } postBuild { always { junit '**/target/surefire-reports/TEST-*.xml' archive '**/target/*.jar' } } }
I did some digging. The good news is with block scoped stages it seems ok.
I reduced it to:
{noscript}node {
stage ('Build') { sh 'mvn clean source:jar package' }
stage ('Browser Tests') {
parallel (
'Firefox': { sh "echo 'setting up selenium environment'" sh 'sleep 5000' },
'Safari': { sh "echo 'setting up selenium environment'" sh 'sleep 5000' },
'Chrome': { sh "echo 'setting up selenium environment'" sh 'sleep 3000' },
'Internet Explorer': { sh "echo 'setting up selenium environment'" sh 'sleep 2000' }
)
}
}
{noscript}
and it seems fine. Same if you change it to non block scoped stages.
Pipeline-model doesn't use block scoped yet.
So this only happens with pipeline-model (Kyoto) syntax, so I think worth investigating. If this is showing up incorrect stage state, there is likely all sorts of other problems.