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

additional library() call not possible after failure

    XMLWordPrintable

Details

    Description

      When trying to load a shared library from a non existing branch it is not possible to load from default or master branch afterwards.

      Consider the following code:

      try {
        // try loading from branch
        library("sharedlib@${env.BRANCH_NAME}")
      }
      catch(Throwable e) {
        library("sharedlib")
      }

      Running this pipeline will result in something like

      [Pipeline] library
      Loading library sharedlib@feature/my-branch
      Attempting to resolve feature/my-branch from remote references...
      ...
      ERROR: Could not resolve feature/my-branch
      ...
      [Pipeline] library
      Only using first definition of library sharedlib

      It seems that "sharedlib" is recorded as "already loaded" despite the error.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gordin Christoph Vogtländer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: