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

incorrect "ERROR: Library blah expected to contain at least one of src or vars directories" message

XMLWordPrintable

      the message about no vars or src is incorrect.

      it is shown if there is no src directory and there are no groovy files in the vars directory.

      for example create a shared library containing just /vars/README.md and some files in /resources. if you try to load it you will get the error ERROR: Library blah expected to contain at least one of src or vars directories but there is a vars directory.

      As can be seen in the code the error message does not match the check.

      this causes confusion.

      whilst I think the error message could be trivially changed I believe that the failure should be removed completely to allow a library with only resources (and not groovy).

      current workaround for both issues is to create a file /vars/hackyWorkaround.groovy containing the following:

      def call() {
          echo "WHY ARE YOU CALLING THIS FUNCTION!??!"
      }
      

            Unassigned Unassigned
            teilo James Nord
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: