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

EnvStep convert map to list

XMLWordPrintable

      Currently EnvStep only accepts String array.

      But it would be nice if it could accept Map<String, String> too
      and convert it to a String array.

      Right now I have to do this in a shared library.

      def call(Closure body) {
        deleteDir()
        def scmVars = checkout scm
        def list = []
        scmVars.each { k, v -> list << "${k}=${v}" }
        withEnv(list) {
          body()
        }
      }
      

       

       

            jetersen Joseph Petersen
            casz Joseph Petersen (old)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: