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

Support for reusable sharing Declarative directives

XMLWordPrintable

      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 {
             ...
         }
      }

       

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

              Created:
              Updated: