Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38285

Add extension point for declarative config sections

    Details

    • Similar Issues:

      Description

      The top-level config sections in Declarative Pipelines are currently hardcoded in the plugin. We need to make them an ExtensionPoint instead. =)

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          So this may not actually be viable for a few reasons:

          • Need to know when to execute whatever script the config section contributes - i.e., how do we know "Ok, run this snippet of code for the postBuild section after stages are done and before we leave the potential node block that stages are run in"? This is the biggie that I just can't figure out an answer to.
          • Adding validation support via moving the methods in ModelValidator to the ModelASTElement extension in question is doable enough, but not ideal.
          • Along the same lines, contributing to the JSON schema (or more accurately, generating the JSON schema dynamically from information provided by the various config sections) is probably doable but a bit ugly conceptually.
          • ModelParser and JSONParser, on the other hand, would need complete rewrites. I'm not sure how we'd do that yet, but given the "when to execute" problem, I don't think it's worth it for me to invest much thought on this in particular yet.
          Show
          abayer Andrew Bayer added a comment - So this may not actually be viable for a few reasons: Need to know when to execute whatever script the config section contributes - i.e., how do we know "Ok, run this snippet of code for the postBuild section after stages are done and before we leave the potential node block that stages are run in"? This is the biggie that I just can't figure out an answer to. Adding validation support via moving the methods in ModelValidator to the ModelASTElement extension in question is doable enough, but not ideal. Along the same lines, contributing to the JSON schema (or more accurately, generating the JSON schema dynamically from information provided by the various config sections) is probably doable but a bit ugly conceptually. ModelParser and JSONParser , on the other hand, would need complete rewrites. I'm not sure how we'd do that yet, but given the "when to execute" problem, I don't think it's worth it for me to invest much thought on this in particular yet.
          Hide
          abayer Andrew Bayer added a comment -

          So I couldn't find a viable way to do this, sadly.

          Show
          abayer Andrew Bayer added a comment - So I couldn't find a viable way to do this, sadly.
          Hide
          bitwiseman Liam Newman added a comment -

          Bulk closing resolved issues.

          Show
          bitwiseman Liam Newman added a comment - Bulk closing resolved issues.

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              abayer Andrew Bayer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: