When using the Jenkins version 2.361 and the JenkinsRule object how can I call the…
Private research annotation
Sign in to add a private research label or note.
- User
When using the Jenkins version 2.361 and the JenkinsRule object how can I call the PluginManager to load additional plugins ?
Assistant
You can't directly call the
PluginManagerfrom aJenkinsRuleobject in Jenkins 2.361.Here's why and what you can do instead:
Why it doesn't work:
- Security: Allowing arbitrary plugin loading from tests could introduce security vulnerabilities.
- Test Isolation: JenkinsRule aims to create isolated test environments. Directly manipulating the global PluginManager could interfere with other tests or leave the system in an inconsistent state.