[Plugin Proposal] Build operations logging

39 views
Skip to first unread message

Harel H

unread,
May 29, 2023, 7:35:45 AM5/29/23
to Jenkins Developers
Hello guys,

We recently needed a plugin that streams build information to Jenkins systems logs:
  • Start time
  • End time
  • Job + build number
  • Result
  • Initiator
  • Agent
We could accomplish it by adding a function to each Jenkinsfile (calling java.util.logging.Logger), but since it had an overhead, I looked for an alternative.

I ended up creating a plugin, after not finding a plugin that does it.
Basically all build start / finish events are written to the (main) system log.

Example logs:
2023-05-29 10:42:57.132+0000 [id=78] INFO log_pipeline_plugin#onStarted: test.pipeline.startup build #90 triggered by hhadad on Built-In Node
2023-05-29 10:43:04.358+0000 [id=86] INFO log_pipeline_plugin#onCompleted: test.pipeline.startup build #90 finished with status: SUCCESS

My Questions:
1. Do you know of a plugin that does similar things?
2. If not, will it be a suitable plugin for hosting?

Thanks,
Harel.

Vincent Latombe

unread,
Jun 1, 2023, 7:52:48 AM6/1/23
to jenkin...@googlegroups.com
Hi,

Have you looked at the Audit Trail Plugin ? It seems to have an implementation of RunListener doing something very close to what you described.

Cheers,

Vincent


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3629c3ba-2a1d-4574-b4ee-b31601209e3an%40googlegroups.com.

Harel H

unread,
Jun 5, 2023, 11:29:34 AM6/5/23
to Jenkins Developers
Thanks Vincent!
Seems like setting the output to STDOUT does exactly what we need. Appreciate your help.
Reply all
Reply to author
Forward
0 new messages