{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/96","repository_url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin","labels_url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/96/comments","events_url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/96/events","html_url":"https://github.com/jenkinsci/promoted-builds-plugin/pull/96","id":184921912,"number":96,"title":"[WIP] Improved/overhauled Job-DSL integration","user":{"login":"Fiouz","id":393371,"avatar_url":"https://avatars.githubusercontent.com/u/393371?v=3","gravatar_id":"","url":"https://api.github.com/users/Fiouz","html_url":"https://github.com/Fiouz","followers_url":"https://api.github.com/users/Fiouz/followers","following_url":"https://api.github.com/users/Fiouz/following{/other_user}","gists_url":"https://api.github.com/users/Fiouz/gists{/gist_id}","starred_url":"https://api.github.com/users/Fiouz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fiouz/subscriptions","organizations_url":"https://api.github.com/users/Fiouz/orgs","repos_url":"https://api.github.com/users/Fiouz/repos","events_url":"https://api.github.com/users/Fiouz/events{/privacy}","received_events_url":"https://api.github.com/users/Fiouz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-24T18:43:27Z","updated_at":"2016-11-06T13:44:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/pulls/96","html_url":"https://github.com/jenkinsci/promoted-builds-plugin/pull/96","diff_url":"https://github.com/jenkinsci/promoted-builds-plugin/pull/96.diff","patch_url":"https://github.com/jenkinsci/promoted-builds-plugin/pull/96.patch"},"body":"Integrates with Job-DSL 1.46 for automatic discovery of extensions via `@ContextType`.\n- Job-DSL dependency bumped to 1.46 (first version to provide automatic DSL generation)\n- Jenkins core dependency bumped to 1.614\n- Overall Job-DSL logic integration modified (@denschu):\n  - From hand-made DSL -> hand-made domain objects instantiation -> tweaked Java-to-XML XStream serialization - _not easily extensible_\n  - To automatically generated DSL -> XML template alterations (`Item.configure(Closure)` invocations) - _extensible and similar to Job-DSL own implementation_\n    `PromotionContext` modified to extends `Item`\n\nAutomatic DSL generation:\n- Added `@ContextType(\"...PromotionCondition\")` to `ConditionsContext`\n- Make `ConditionsContext` extends `AbstractExtensibleContext` + made more Groovy to handle dynamic DSL\n- Make `PromotionContext` extends `Item` since a promotion is its own item with its own XML (no more XML transformation in `PromotionsExtensionPoint`)\n- Added `@Symbol` to `PromotionCondition` descriptors\n- Hand-made legacy conditions DSL adapted to `Item`-based XML manipulations\n- `JobDslPromotionProcess` is now made obsolete by automatic DSL integration (was used for tweaked XML serialization)\n\nQuirks:\n- `DslEnvironment` is not able to expose itself to instantiated classes (`createContext()`) nor does it expose the `JobManagement` instance from the current default implementation. When both are needed for deep context nesting, an UGLY workaround was implemented `FakeContext` + manual context instantiation. @daspilker any recommendation?\n- TODO Integration test is currently very light (only tested a `PromotionCondition` that was not useable from manual DSL) and some previously implemented tests are commented-out since they covert now dead code\n"},"comment":{"url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/comments/258681707","html_url":"https://github.com/jenkinsci/promoted-builds-plugin/pull/96#issuecomment-258681707","issue_url":"https://api.github.com/repos/jenkinsci/promoted-builds-plugin/issues/96","id":258681707,"user":{"login":"Fiouz","id":393371,"avatar_url":"https://avatars.githubusercontent.com/u/393371?v=3","gravatar_id":"","url":"https://api.github.com/users/Fiouz","html_url":"https://github.com/Fiouz","followers_url":"https://api.github.com/users/Fiouz/followers","following_url":"https://api.github.com/users/Fiouz/following{/other_user}","gists_url":"https://api.github.com/users/Fiouz/gists{/gist_id}","starred_url":"https://api.github.com/users/Fiouz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fiouz/subscriptions","organizations_url":"https://api.github.com/users/Fiouz/orgs","repos_url":"https://api.github.com/users/Fiouz/repos","events_url":"https://api.github.com/users/Fiouz/events{/privacy}","received_events_url":"https://api.github.com/users/Fiouz/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T13:44:16Z","updated_at":"2016-11-06T13:44:16Z","body":"@daspilker Use of non-public APIs has been reviewed: \r\n\r\n- `AbstractExtensibleContext` use was replaced by use of `ExtensibleContext` + `JobManagement.callExtension()` (https://github.com/jenkinsci/promoted-builds-plugin/pull/96/commits/b74fce16c40427c682505e7bc76ce28ad93bed76#diff-0c930e37369ecd993a92b71582387ad4R227).\r\n- `Item` was replaced by duplicating `ContextHelper` into this plugin (https://github.com/jenkinsci/promoted-builds-plugin/pull/96/commits/e839f3fc779e142153328dff0f77ff0938436747) to remove coupling while maintaining DSL API exposed to users."}}
{"actor":{"display_login":"Fiouz"}}