Skip to content

JCasC templating and inheritance support #1066

@oleg-nenashev

Description

@oleg-nenashev

Currently 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

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions