jenkinsci / jenkinsci/workflow-cps-global-lib-plugin

[JENKINS-56099] Global Libraries SCM added to Job SCMs; breaks changes view

Open
#369 0 comments 0 reactions 0 assignees View on GitHub
component:workflow-cps-global-lib-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
227
Forks
116
PR merge metrics
No merged PRs in 30d

Description

We are at the moment migrating our Source from RTC (Jazz CCM) SCM to Git and while our Global (trusted) Shared Library is still in RTC, there are already some Jobs that use Git (Multibranch Pipeline using GitHub Folder). The GitHub folder has an additional (untrusted) library from Git SCM, but that is not the problem here.

Unfortunatley the Checkout of the Global Library from RTC seems to add RTC SCM to the Jobs/Builds used SCMs, which breaks the "Changes" view of the job, because there are multiple SCMs (Git and RTC) in use.

For the Global Library from RTC the "Include @​Library Changes in Changes" is unset, so I expected the Changes view not to break. I am not sure, but I suspect that if we move the Global Library from RTC to Git, the Changes view of (all!) the jobs that at the moment still use RTC SCM would break.

I am happy to help fixing this, but I did not find the place where the SCM is added to the Build. (The deepest I got was to the following class, but I didn't get any further nor am I sure whethere I am in the right place: https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/SCMSourceRetriever.java#L147)

---
Originally reported by ciis0, imported from: Global Libraries SCM added to Job SCMs; breaks changes view


  • status: Open
  • priority: Major
  • component(s): workflow-cps-global-lib-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

We are at the moment migrating our Source from RTC (Jazz CCM) SCM to Git and while our Global (trusted) Shared Library is still in RTC, there are already some Jobs that use Git (Multibranch Pipeline using GitHub Folder). The GitHub folder has an additional (untrusted) library from Git SCM, but that is not the problem here.

Unfortunatley the Checkout of the Global Library from RTC seems to add RTC SCM to the Jobs/Builds used SCMs, which breaks the "Changes" view of the job, because there are multiple SCMs (Git and RTC) in use.

For the Global Library from RTC the "Include @Library Changes in Changes" is unset, so I expected the Changes view not to break. I am not sure, but I suspect that if we move the Global Library from RTC to Git, the Changes view of (all!) the jobs that at the moment still use RTC SCM would break.

I am happy to help fixing this, but I did not find the place where the SCM is added to the Build. (The deepest I got was to the following class, but I didn't get any further nor am I sure whethere I am in the right place: https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/SCMSourceRetriever.java#L147)

environment

```
Jenkins 2.147

Pipeline: Shared Groovy Libraries 2.12

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.