EnvStep convert map to list

This issue is archived. You can view it, but you can't modify it. Learn more

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()
        }
      }
      

       

       

            Assignee:
            Joseph Petersen
            Reporter:
            Joseph Petersen (old)
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: