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
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)