Jenkins Pipelines:为什么不加载CPS Global Lib?

Jenkins Pipelines:为什么不加载CPS Global Lib?,第1张

Jenkins Pipelines:为什么不加载CPS Global Lib?

Pipeline全球图书馆希望Git推送事件能够更新Jenkins嵌入式工作流库git repo。

推送会触发该
UserDefinedGlobalVariableList.rebuild()
方法,请参见:[https](https://github.com/jenkinsci/workflow-
cps-global-lib-
plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/global/UserDefinedGlobalVariableList.java)
//github.com/jenkinsci/workflow-cps-global-lib-
plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/global/UserDefinedGlobalVariableList
.java

这是一个普通的脚本,它将GitHub存储库拉入Jenkins存储

workflow-libs
库,然后通过以下方式重新加载它而无需重新启动:

//Get Pipeline Global Library Jenkins Extension that rebuilds global libraryon Git Push List extensions =ExtensionList.lookup(UserDefinedGlobalVariableList.class);extensions.get(0).rebuild() //may want to add a check here to make sureextensions isn't null



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5642415.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存