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

Allow to return multiply objects in DslExtensionMethod

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It can be useful to extend ways of creating custom dsl for plugins with lot of steps.

          @DslExtensionMethod(context = StepContext.class)
          public Object concreteDslMethod(Runnable closure) {
              SomeContext context = new SomeContext();
              executeInContext(closure, context);
              return asList(context.getStep1(), context.getStep2());
          }
      

      in dsl it can look as some local context of plugin for lot of steps

      steps {
              concreteDslContext {
                      step1 {} // builder1
                      step2 {} // builder2
              }
      }
      

      For now it can be only

      steps {
              concreteDslContext {
                      step1 {} // builder1
              }
      
              concreteDslContext {
                      step2 {} // builder2
              }
      }
      

      or

      steps {
              concreteDslContextStep1 { // builder1           
              }
      
              concreteDslContextStep2 { // builder2
              }
      }
      

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              lanwen Kirill Merkushev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: