jenkinsci / plugin-compat-tester

Jenkins Plugin Compatibility Tester
MIT License
46 stars 55 forks source link

Add the plugin name to the hook log #535

Closed jtnord closed 1 year ago

jtnord commented 1 year ago

without this the output (for the BeforeCheckoutHook) is not so helpful, we are running hooks but for which plugin (and if it failed would may not easily be able to tell which plugin was the cause in all cases)

This also adds a log in the case there are no hooks to run.

Closes #531

sample output:

2023-04-20 12:42:42.669+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-multibranch
2023-04-20 12:42:42.670+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-scm-step
2023-04-20 12:42:42.671+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-step-api
2023-04-20 12:42:42.674+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-support
2023-04-20 12:42:42.685+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Jenkins Active Directory plugin
2023-04-20 12:42:42.685+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Analysis Model API Plugin
2023-04-20 12:42:42.685+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Ant Plugin
2023-04-20 12:42:42.686+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for OWASP Markup Formatter Plugin
2023-04-20 12:42:42.686+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Jenkins Apache HttpComponents Client 4.x API Plugin
2023-04-20 12:42:42.686+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Artifact Manager on S3 plugin
2023-04-20 12:42:42.686+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: Running hook: org.jenkins.tools.test.hook.TagValidationHook for Authentication Tokens API Plugin

without hooks

2023-04-20 12:45:24.202+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-scm-step
2023-04-20 12:45:24.204+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-step-api
2023-04-20 12:45:24.208+0000 [id=1]     INFO    o.j.tools.test.util.WarExtractor#getPlugin: Extracting metadata for workflow-support
2023-04-20 12:45:24.217+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: No hooks registered for stage CHECKOUT for Jenkins Active Directory plugin
2023-04-20 12:45:24.218+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: No hooks registered for stage CHECKOUT for Analysis Model API Plugin
2023-04-20 12:45:24.218+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: No hooks registered for stage CHECKOUT for Ant Plugin
2023-04-20 12:45:24.218+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: No hooks registered for stage CHECKOUT for OWASP Markup Formatter Plugin
2023-04-20 12:45:24.219+0000 [id=1]     INFO    o.j.t.t.m.h.PluginCompatTesterHooks#runHooks: No hooks registered for stage CHECKOUT for Jenkins Apache HttpComponents Client 4.x API Plugin
basil commented 1 year ago

Thanks!