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

"libraries" directive is not documented

XMLWordPrintable

      I use the declarative "libraries" directive in all my pipelines:

      libraries {
        lib('test@asdf')
      } 

      Without realising the drawbacks of this syntax, I started using it a couple of years ago.

      Basically, it does not support the "changelog=false" parameter and it ignores the "Include @Library changes in recent job changes" setting, which makes sense if you know that @Library is a completely different command. 

      However, there is no way to avoid triggering all projects, including libs, when they are updated, which is problematic in many ways.

      There are a number of open issues regarding the behaviour of "lib change triggers builds" and I think this confusion is the main reason. 

      During my investigation I checked the documentation and found that the "libraries" directive is the only one that is not documented. The directive generator shows it, but gives no further information.

      So is this directive supported or deprecated?

      Personally, I like it better than the @Library syntax, but it should honour the "ignore changes" option globally and by parameter.

      A bunch of related issues are here:

      https://issues.jenkins.io/browse/JENKINS-65649

      https://issues.jenkins.io/browse/JENKINS-41497

      https://issues.jenkins.io/browse/JENKINS-39615

            Unassigned Unassigned
            debugbug Richard
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: