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

Support Declarative Pipeline method to return the file path (similar to tool() and credential() methods)

XMLWordPrintable

      The scripted syntax step configFileProvider is workable, but it would be nice to directly set env variables in the declarative environment{} section or in the withEnv() step. 

      environment {
        FOO_CONFIG_FILE = configFile('default-foo-settings')
      }

      and

      withEnv(["FOO_CONFIG_FILE=${configFile 'default-foo-settings'}"]) {
        ...
      }

       

            domi Dominik Bartholdi
            jg_lgc Justin Georgeson
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: