In CloudBees CI, we implemented a custom Lifecycle implementation in a plugin.
The existing implementation of Lifecycle relied on UberClassloader however it was running before any plugin was loaded, so in practice setting a custom lifecycle coming from a plugin through the system property hudson.lifecycle was causing Jenkins startup to fail.
This is proposing a way for plugins to contribute custom lifecycles that can be activated using the system property hudson.lifecycle.
- links to
[JENKINS-72111] Pluggable Lifecycle
Labels | New: api |
Assignee | New: Vincent Latombe [ vlatombe ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "PR #8555 (Web Link)" [ 28955 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Assignee | Original: Vincent Latombe [ vlatombe ] | New: Jesse Glick [ jglick ] |
Description |
Original:
In CloudBees CI, we implemented a custom Lifecycle implementation in a plugin.
With the way the Lifecycle class is implemented, {{Lifecycle.get()}} could get called even before plugins are initialized, and so it is not safe to pass a plugin-defined lifecycle to the system property {{hudson.lifecycle}} This proposes to add a setter method allowing a plugin to update the active lifecycle. |
New:
In CloudBees CI, we implemented a custom Lifecycle implementation in a plugin.
The existing implementation of Lifecycle relied on UberClassloader however it was running before any plugin was loaded, so in practice setting a custom lifecycle coming from a plugin through the system property {{hudson.lifecycle}} was causing Jenkins startup to fail. This is proposing a way for plugins to contribute custom lifecycles that can be activated using the system property {{hudson.lifecycle}}. |
Remote Link | New: This issue links to "PR #8589 (Web Link)" [ 28969 ] |
Alternately: https://github.com/jenkinsci/jenkins/pull/8589