How to hide git changelog about shared library in Jenkins multibranch pipeline

Hi,

I’m trying to hide git changelog/changeset about shared library within a Jenkins multibranch pipeline.

I’ve explored explored various options without success.
Let’s overview what I’ve tried and please let m know if there’s something I’m missing:

Options Explored:

option 1: unchecked “Include @Library changes in job recent changes” from system global configurations

option 2: add “changelog: false” to pipelines

Since I’m using various pipeline types I was able to tried them all:

  • example 1: library identifier: '<my shared lib>@<shared lib branch>', changelog: false
  • example 2: @Library(value='<my shared lib>@<shared lib branch>', changelog=false)

option 3: clear ChangeSets and perform checkout

In this option we can run currentBuild.getChangeSets().clear() and then we chan perform git clone with checkout scm (or other git command).
However, this would require manual checkout, losing the benefit of automatic default checkout scm.

None of the 3 options above worked for me, and I’m still seeing the shared library changelog in my multibranch pipelines.

Any other solutions?

It seems there’s an open ticket (link) related to hiding changesets, but I’m not quite sure if this ticket is also relevant for multibranch pipelines.

jenkins version: 2.462.2