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

Provide libraryResourceAsFile step

XMLWordPrintable

      Currently it is only possible to get library resources as a string using

      libraryResource 'foo.txt'

      However, this does not work for binary files and is also awkward to use when you need the resource as a file; you have to use a workaround like

      def fooContent = libraryResource 'foo.txt'
      writeFile file: 'foo.txt', text: fooContent
      

      It would be handy to have a step which provides the resource as file, like this (file could be optional and per default equal to resource):

      libraryResourceAsFile resource: 'foo.txt', file: 'foo-from-resource.txt'
      

            Unassigned Unassigned
            schulzha Hans Schulz
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: