workflow-cps-global-lib-plugin icon indicating copy to clipboard operation
workflow-cps-global-lib-plugin copied to clipboard

Allowing a library name to be passed to the libraryResource step

Open jmcshane opened this issue 6 years ago • 7 comments

This would allow Jenkinsfile authors to specify the library name that is included to avoid duplication across resources.

jmcshane avatar Jul 25 '18 03:07 jmcshane

I just merged #48 which introduced a merge conflict, sorry! Also, it would be great to add a help-libraryName.html file explaining how to use the new parameter (similarly to what was done for the encoding parameter in #48).

dwnusbaum avatar Aug 17 '18 20:08 dwnusbaum

I should be able to get around to these comments today, I’ll make sure to rebase and resolve that conflict.

jmcshane avatar Aug 19 '18 16:08 jmcshane

@dwnusbaum Could you check now? Thanks!

jmcshane avatar Sep 06 '18 20:09 jmcshane

Tread carefully here. I am not convinced this is safe, which is why I did not offer such an option to begin with.

jglick avatar Oct 08 '18 13:10 jglick

Also from a usage perspective this is dubious. libraryResource is normally called from library code. But a library does not, in general, know its own name—this is picked arbitrarily by an administrator. So you could not use this feature portably. It could only be used by a library written for exclusive use in a particular environment. But then why would there be duplication?

It would be helpful to have an explanation of what the original problem was which you are attempting to solve via this feature.

jglick avatar Oct 08 '18 13:10 jglick

Any progress with this pull request?

caporegim avatar Nov 21 '19 19:11 caporegim

As of #172 most of the code in this plugin has been moved to another plugin repository so this PR must be closed. If this change is still needed, please

git clone https://github.com/jenkinsci/pipeline-groovy-lib-plugin
cd pipeline-groovy-lib-plugin
git checkout -b SELECT-BRANCH-NAME
git pull https://github.com/jmcshane/workflow-cps-global-lib-plugin master

resolve any merge conflicts, and file a fresh PR on the new repository. Be sure to paste a link to this old PR to enable bidirectional navigation.

jglick avatar May 23 '22 23:05 jglick