Hi
I'm looking at fixing
JENKINS-54840 in the build-failure-analyzer plugin
It has functionality where a user can force another analysis to be run on a build
This gets the log file on disk, opens a PrintStream to it and appends log information to it about the scan result
Code:
https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/src/main/java/com/sonyericsson/jenkins/plugins/bfa/sod/ScanOnDemandTask.java#L110On recent pipeline versions this is logging exceptions on every call "WARNING org.jenkinsci.plugins.workflow.job.WorkflowRun getLogFileAvoid calling getLogFile on TestWorkflow/TestWorkflow #362
java.lang.UnsupportedOperationException"
Is there a supported way to append to a log file after the build is completed? I see ways to get an InputStream, the log text and writeLogTo (seems to be for writing a whole log though)
Or should this functionality be re-written?
My guess is that build-failure-analyzer should probably have it's own log file, which can just be overwritten on every scan.
If this is the approach is there any good example out there that you would recommend?
Thanks
Tim