| When using declarative pipelines in combination with parallel builds and sub job starting, the build logs are lost. Example:
stage('Check pipelines') {
parallel {
stage('Check Java pipeline') {
steps {
script {
build job:'../dcx-service-template/master',
parameters: [string(name: 'SHARED_PIPELINE_BRANCH', value: "${GIT_BRANCH}")]
}
}
}
stage('Check NodeJs pipeline') {
steps {
script {
build job:'../jenkins-pipeline-testing-nodejs/master',
parameters: [string(name: 'SHARED_PIPELINE_BRANCH', value: "${GIT_BRANCH}")]
}
}
}
}
}
}
This will work and execute properly, but the build logs will disappear after the firrst "build job", which will make it look like this :
[...]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Check pipelines)
[Pipeline] parallel
[Pipeline] { (Branch: Check Java pipeline)
[Pipeline] { (Branch: Check NodeJs pipeline)
[Pipeline] script
[Pipeline] {
[Pipeline] script
[Pipeline] {
[Pipeline] build (Building ShopDirect » dcx-service-template » master)
Scheduling project: ShopDirect » dcx-service-template » master
[Pipeline] build (Building ShopDirect » jenkins-pipeline-testing-nodejs » master)
And the logs will stop there instead of displaying the number of the child jobs once they start, and display the following steps logs |