Repository navigation
Add support for jobs without jobdsl (freestyle only to start) - #2881
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces an items root element to Jenkins Configuration as Code (JCasC) to allow defining Jenkins items (jobs/folders) via native YAML, backed by a new ItemConfigurator extension point so plugins can implement YAML-backed item creation/update without relying on Job DSL.
Changes:
- Add
ItemsRootConfiguratorroot element that iteratesitems:YAML and delegates item creation/update toItemConfiguratorimplementations. - Introduce
ItemConfigurator<T extends TopLevelItem>extension point for plugins to provide native YAML item configuration. - Add test coverage and YAML fixtures validating success paths and key failure modes (unknown type, missing name, malformed structure).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test-harness/src/test/resources/io/jenkins/plugins/casc/core/ItemsRootConfiguratorTest.yml | Positive fixture: creates/updates an item via items: using a dummy configurator. |
| test-harness/src/test/resources/io/jenkins/plugins/casc/core/ItemsRootConfiguratorTest_unknown.yml | Negative fixture: unknown item type. |
| test-harness/src/test/resources/io/jenkins/plugins/casc/core/ItemsRootConfiguratorTest_missingName.yml | Negative fixture: missing required name. |
| test-harness/src/test/resources/io/jenkins/plugins/casc/core/ItemsRootConfiguratorTest_malformed.yml | Negative fixture: malformed items shape (mapping vs sequence). |
| test-harness/src/test/java/io/jenkins/plugins/casc/core/ItemsRootConfiguratorTest.java | Test harness validating delegation, update behavior, and error cases. |
| plugin/src/main/java/io/jenkins/plugins/casc/ItemConfigurator.java | New extension point for plugin-provided YAML-backed item configuration. |
| plugin/src/main/java/io/jenkins/plugins/casc/core/ItemsRootConfigurator.java | New root configurator implementing items: parsing and delegation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@timja Can you review this pr? |
Member
|
It is on my list. |
|
Meanwhile, @somiljain2006, can you add some documentation highlighting how to use this new feature? |
This was referenced Jul 31, 2026
Contributor
Author
|
@timja Can you take a look |
timja
reviewed
Jul 31, 2026
timja
reviewed
Aug 1, 2026
timja
reviewed
Aug 1, 2026
timja
reviewed
Aug 2, 2026
Member
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1604
Introduce JCasC support for configuring Jenkins items through YAML by adding an items root configurator and ItemConfigurator extension point. This enables plugins to provide native YAML configuration for jobs and folders without
relying on Job DSL.
Your checklist for this pull request
🚨 Please review the guidelines for contributing to this repository.