-
Task
-
Resolution: Unresolved
-
L3 - Default
-
None
-
None
-
None
-
None
Background
During the implementation of the new CamBPM pipeline we found that Jenkins doesn't provide a proper way to parse stage logs which we needed to do conditional retry within the stage.
Problem
We then used the project pipeline-logparser as cambpmLogparser.groovy to use it in the custom step cambpmConditionalRetry.
The custom log parser worked well so far, however it has some downsides:
- It's Groovy script and has a lot of logic so could be a bit slow (not a big deal because it's only invoked when the stage is failed)
- It will be a bit hard to maintain because it's outside of the Jenkins plugins system.
Needed action
- At certain point we need to replace it because it's more or less a hack/workaround till we have a proper way to access the stage logs.
Hints
During looking for a solution to that challenge (to get logs of certain stage), I've found a really nice plugin called "Text Finder" to search of patterns in logs but it doesn't support stages and doesn't return the matched text (which a requirement for our use case).
So I've opened 2 tickets for the plugin maintainers:
- JENKINS-64680 - Scope searching to stage logs.
- JENKINS-64681 - Allow to return matched text.
Those 2 features could be interesting for us as Slack day or side project