How to find specific errors from jenkins console output and print them by echo statement
-- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2ec2fd9f-7042-4a0a-a004-c5eb745e6602n%40googlegroups.com. |
There are different approaches but need more information, can you elaborate?
On Tuesday, 19 January 2021 at 10:14:08 UTC [hidden email] wrote: How to find specific errors from jenkins console output and print them by echo statement You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bc83afb3-21b8-43b9-8edf-b86cd31cd250n%40googlegroups.com. |
For example I made a missing of closing statement " } " in my pipeline script as shown below
![]() Which produces the error in jenkins console output as shown below ![]() So I want to print out the wrong statement in my jenkins output (using echo ) along with buildnumber ,build outcome as shown below . ![]() For example in this particular build it should say expecting '}', found '' @ line 23, column 1. On Tuesday, January 19, 2021 at 6:51:59 PM UTC+5:30 [hidden email] wrote: There are different approaches but need more information, can you elaborate? You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c7eadd7b-d8a4-4e57-a752-250bf5cecfean%40googlegroups.com. |
I understand now, thanks.
I'm afraid in your case the issue is related to a syntax error in the Pipeline so nothing about a runtime error, so there is no way to run any echo as you want. Though If I recall the Text Area field had a syntax validation, but I cannot find if that's true or something I just wrongly said. I might need to dig a bit deeper, so I'll comment here if I can find something. In any case, if you use pipeline script from SCM definition then you could benefit of the linting in your local environment:
Cheers On Tuesday, 19 January 2021 at 18:13:12 UTC [hidden email] wrote: For example I made a missing of closing statement " } " in my pipeline script as shown below You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f5385f0d-d84c-42dd-9991-7db573cf9fdcn%40googlegroups.com. |
Thanks alot for your help @victor
On Wednesday, January 20, 2021 at 6:35:59 PM UTC+5:30 [hidden email] wrote: I understand now, thanks. You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e3730992-62e6-4ea4-ab6a-79cc5233fc2bn%40googlegroups.com. |
Free forum by Nabble | Edit this page |