When defining a running Declarative Pipeline which declares an {{environment}} directive in below particular case error signal descriptions are does not expandible in Blue Ocean view display any descriptions.
declarative-pipeline-error-signal-example-with-env-var: {code:java} pipeline { agent none environment { EXAMPLE_VARIABLE = 'This is an example variable' } stages { stage The only place to find it('Error Example'and its there properly expanded) { steps { error "This is an error example using declarative pipeline" } } } } {code} Note that when looking at Blue Ocean output that the error description is not expandible:
!declarative-pipeline-error-signal-example-with-env-var end of console output.png! The issue is not reproduced when using Scripted Pipeline.
scripted-pipeline-with-env-var: {code:java} node { withEnv(['EXAMPLE_VARIABLE="this is an example variable"']) { stage('Error ExamplePipeline-PR') { error "This is an example error message using scripted pipeline" } } } when{code} Error is expandible in Blue Ocean: changeRequest() !scripted-pipeline-with- expression {env-var.png!
Looking at the console logs in the Declarative Pipeline example.
When running Declarative Pipeline in below particular case error signal does not display any descriptions. The only place to find it (and its there properly expanded) is the end of console output. {code:java} stage ('Pipeline-PR') { when { changeRequest() expression { env.CHANGE_TARGET == 'master' || env.CHANGE_TARGET == 'develop' } } steps { script { def version = bat(script: "@set library.componentPipeline.version", returnStdout: true).split("=",2).last().trim() if (version != 'master') { error "Pull request targeting ${env.CHANGE_TARGET} cannot be based on ${version} branch of component pipeline, should be based on master!" } } } }{code} shows only as:
When running Declarative Pipeline in below particular case error signal does not display any descriptions. The only place to find it (and its there properly expanded) is the end of console output. {code:java} stage ('Pipeline-PR') { when { changeRequest() expression { env.CHANGE_TARGET == 'master' || env.CHANGE_TARGET == 'develop' } } steps { script { def version = bat(script: "@set library.componentPipeline.version", returnStdout: true).split("=",2).last().trim() if (version != 'master') { error "Pull request targeting ${env.CHANGE_TARGET} cannot be based on ${version} branch of component pipeline, should be based on master!" } } } }{code} shows only as:
It happens to me when the variable to be interpolated is larger than 104 characters.
Example, when metaDataFilePath is larger than 104 characters, the entire error description is not displayed on blue ocean. error signal is still displayed.
error ("[ERROR] Metadata missing for ${bundleName} : Unable to find ${metaDataFilePath}. Please make sure the file exists.")