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

use fixed folder name for groovy libs

XMLWordPrintable

      Previous version of   Groovy Libraries(Pipeline: Deprecated Groovy Libraries) was creating a folder with name of library like /var/lib/jenkins/workspacename@libs/library-name

      But new version of this plugin creates a folder with a hash https://github.com/jenkinsci/pipeline-groovy-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/LibraryRecord.java#L65

      `this.directoryName = directoryNameFor(name, version, String.valueOf(trusted), source);`

       

      This creating an issue while referencing a file in same repository of  groovy script inside the script. We have to know hash value of directory to be able to read a file.

       

      It was quite easy before

      readFile("$WORKSPACE@libs/mylibrary-name/myfile.txt")

       

      Is there any way to provide  parameter for groovy directory name or fix it to library name by default.

       

      Thanks

            Unassigned Unassigned
            iyenigul ismail yenigul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: