5

Is it possible to create a warning log message in Jenkins Blue Ocean view like the unstable(MESSAGE) warning message, but without setting the hole build state as unstable?

I mean the yellow/orange log message in this view "Couldn't load dependencies!": Example of unstable()

catchError(message: 'MESSAGE', buildResult: 'SUCCESS', stageResult: 'UNSTABLE') will also not help, because the message is not visible in the Blue Ocean view.

rhhamburg
  • 133
  • 1
  • 7
  • Would it be OK to show stage result as "unstable" or is it required that only the message shows with yellow background? – zett42 May 02 '20 at 18:22
  • That would be OK. A yellow message and a yellow stage result but a green build result. – rhhamburg May 02 '20 at 21:32
  • 3
    There is `unstable` step, but this also marks the whole build as unstable. So I don't think this is currently possible (at least not straightforward, maybe through the jenkins/hudson API, I have not tried). I'm currently using `echo '\u26A0\uFE0F Some message'` for warnings which prints like "⚠️ Some message". – zett42 May 02 '20 at 22:50
  • 2
    @zett42 thanks for the idea with the sign! But it's frustrated. I just want to create a simple warning message with the default Blue Ocean design. Why it exists not a method like `warning` to create this? Or a flag for the `echo` method? Hmm – rhhamburg May 03 '20 at 12:03

0 Answers0