jenkinsci / jenkinsci/pipeline-github-lib-plugin

[JENKINS-55795] shared library cannot import content from src directory

Open
#122 0 comments 0 reactions 0 assignees View on GitHub
component:pipeline-github-lib-plugin imported-jira-issue jira-type:task priority:major resolution:unresolved
Dominant language
Java
Stars
10
Forks
15
Avg merge
6m
Merged PRs (30d)
1

Description

I cannot get content from the src folder on a shared library, if the library is imported via UI, then it works fine, but dinamically imported ignores anything from src and just methods on the /var folder are available.

I import the library the following way:

library (identifier: 'libraryName@​libraryBranch', retriever: modernSCM(

[$class: 'GitSCMSource',

remote: 'https://www.mylibraryRepo.git'))|https://www.mylibraryrepo.git%27]%29%29/]

 

doing it that way nothing but the /var content is available. importing the library by defining it in the jenkins configuration and then including "@​Library('libraryName') _" works like a charm.

 

Am I missing something or is just that I am running on circles of a thing that is not supported?

 

Thanks 

Juan

---
Originally reported by joanperez, imported from: shared library cannot import content from src directory


  • status: Open
  • priority: Major
  • component(s): pipeline-github-lib-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20260601-173816

Raw content of original issue

I cannot get content from the src folder on a shared library, if the library is imported via UI, then it works fine, but dinamically imported ignores anything from src and just methods on the /var folder are available.

I import the library the following way:

library (identifier: 'libraryName@libraryBranch', retriever: modernSCM(
[$class: 'GitSCMSource',
remote: 'https://www.mylibraryRepo.git'))|https://www.mylibraryrepo.git%27]%29%29/]

 

doing it that way nothing but the /var content is available. importing the library by defining it in the jenkins configuration and then including "@Library('libraryName') _" works like a charm.

 

Am I missing something or is just that I am running on circles of a thing that is not supported?

 

Thanks 

Juan

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.