JCasC templating and inheritance support
See original GitHub issueCurrently JCasC does not support YAML templating or inclusion in any means. For example, in https://github.com/oleg-nenashev/demo-jenkins-config-as-code/blob/master/init_scripts/src/main/groovy/scripts/Docker.groovy I create multiple Docker Cloud templates for different agent types. The configuration would be huge and difficult to maintain in JCasC.
I would suggest having an engine similar to what https://github.com/probot/probot-config does using Deepmerge:
- Independent YAML files can be created for configuration snippets and templates
- External configuration files can be referenced via
_extends
notion at any level. Local files or other configuration providers (once implemented) can be referenced - JCasC reads references when loading or validating configs
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Advanced CasC topics for controllers
Configuring bundle inheritance with CasC. You can simplify bundle composition and maintenance by creating a "child" bundle that inherits common configuration ...
Read more >2.0 Upgrade Guide :: Solutions Delivery Platform
Jenkins Templating Engine · 2.0 Upgrade Guide ... In order to support library resources, the file structure of libraries has been reorganized.
Read more >Jenkins Configuration as Code
With JCasC, setting up a new Jenkins controller will become a no-brainer event. ... No need to write glue code for every supported...
Read more >jenkinsci/templating-engine-plugin - Gitter
pipeline template node() build() # project pipeline config libraries ... “not in JTE” template{ // will load whatever configuration has been inherited by ......
Read more >CloudBees CI Configuration Bundle Inheritance and ...
yaml file) into two files and put those files in a jcasc folder to make the configuration files easier to manage. The items...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
file order should already be taken into account
Found this issue while trying to determine how best to atomize my many many jobs outside of a single gigantic jenkins.yaml, is it possible or on the roadmap? (EDIT: I will be leveraging Ansible and Jinja to compile the resulting jenkins.yaml for now to get the include functionality I want)