-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support configuration as code (#262)
* Add CasC support for the PrioritySorterConfiguration class The PrioritySorterConfiguration class couldn't be configured with CasC (Configuration as Code) jenkins plugin. * Add support for configuration as code plugin usage The configuration for the priority sorter plugin can be defined with the [configuration as code plugin](https://github.com/jenkinsci/configuration-as-code-plugin). This is the example from the junit test resource file `PriorityConfiguration.yaml` ``` unclassified: priorityConfiguration: jobGroups: - id: 0 priority: 1 description: "Complex" runExclusive: true usePriorityStrategies: true priorityStrategies: - userIdCauseStrategy: priority: 1 - upstreamCauseStrategy - userIdCauseStrategy: priority: 3 - cLICauseStrategy: priority: 4 - jobPropertyStrategy - buildParameterStrategy: parameterName: priority jobGroupStrategy: folderBased: folderName: "Jenkins" - id: 1 priority: 2 description: "Simple" runExclusive: false usePriorityStrategies: false jobGroupStrategy: allJobs ``` * Add test assertion for the casc priorityStrategies configuration Extend the ConfigurationAsCodeTest test case to also assert the casc defined priorityStrategies configurations. The test casc configuration resource files for the ConfigurationAsCodeTest test case class are at a similar location then all the other configuration test files. * Exclude commons-lang3 from test dependency * Format current files * Fix merge error * Format source files * Exclude one new spotbugs warning * Use DataBoundConstructor in JobGroup * Fix errors when holder contains array * Resolve errors when exporting configuration using casc * Extract exportTest to separate class * Include new icon from master branch * Add README section about casc. * Use hamcrest assertThat, not deprecated JUnit assertThat * Add a round trip JCasC test with JCasC test class * Test contents of job groups * Add another JCasC round trip test --------- Co-authored-by: Frank Ittermann <[email protected]> Co-authored-by: Mark Waite <[email protected]> Co-authored-by: kmykitiuk <[email protected]>
- Loading branch information
1 parent
1a5c0d9
commit e90616b
Showing
23 changed files
with
979 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.