• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • Jenkins ver. 2.7.4

      It does not appear that org.jenkinsci.plugins.workflow.cps.GlobalVariable implementations can contribute many details to the GSDL.

      I just get an entry like this:
      >> property(name: 'openshift', type: 'com.openshift.jenkins.plugins.pipeline.OpenShiftGlobalVariable')

      Since there is no way straightforward way for Jenkins to introspect all of the methods I'm exposing from my variable definition, it would be nice if I could contribute my own GDSL snippet from my plugin's resources directory.

          [JENKINS-40543] Global Variable GDSL Contribution

          Jesse Glick added a comment -

          Perhaps. But then you would also need to provide DSLD, etc. Generally I would discourage use of global variables as sub-DSLs as in the OpenShift example. Works better to have a set of decoupled steps.

          Jesse Glick added a comment - Perhaps. But then you would also need to provide DSLD, etc. Generally I would discourage use of global variables as sub-DSLs as in the OpenShift example. Works better to have a set of decoupled steps.

          Justin Pierce added a comment - - edited

          Good point, but I'd certainly be willing to supply those as a plugin developer. In the OpenShift domain, the end-user experience made possible with a fluent style DSL outweighs the additional xSLD costs. The docker-workflow plugin is another example where tradeoff was made.

          Justin Pierce added a comment - - edited Good point, but I'd certainly be willing to supply those as a plugin developer. In the OpenShift domain, the end-user experience made possible with a fluent style DSL outweighs the additional xSLD costs. The docker-workflow plugin is another example where tradeoff was made.

          Jesse Glick added a comment -

          I never liked the design of docker-workflow and regret accepting it. These styles of DSLs are also not easily compatible with Declarative.

          Jesse Glick added a comment - I never liked the design of docker-workflow and regret accepting it. These styles of DSLs are also not easily compatible with Declarative.

            Unassigned Unassigned
            jupierce Justin Pierce
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: