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

Support for reusable sharing Declarative directives

      I'd like to be able to share recommended defaults for options directives. My initial use case was sharing steps through shared libraries.

       

      // vars/defaultOptionsConfig.groovy
      call() {
          timestamps()
      }
      
      options {
         defaultOptionsConfig()
         ansiColor('xterm')
      }

       

      At the same time, It'd also be nice to be able to be able to shared directives generally, so I didn't want to scope the request down too far.

       

      // vars/defaultOptions.groovy
      call() {
         options {
             timestamps()
         }
      }
      
      pipeline {
      ...
         defaultOptions()
         stages {
             ...
         }
      }

       

          [JENKINS-49135] Support for reusable sharing Declarative directives

          Robby Pocase created issue -
          Andrew Bayer made changes -
          Summary Original: Support for reusable sharing option directives New: Support for reusable sharing Declarative directives
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #241 (Web Link)" [ 19945 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-50548 [ JENKINS-50548 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]

            Unassigned Unassigned
            rpocase Robby Pocase
            Votes:
            27 Vote for this issue
            Watchers:
            37 Start watching this issue

              Created:
              Updated: