Jenkins Pipeline - Call functions in shared jar

别说谁变了你拦得住时间么 提交于 2019-12-08 15:15:23

问题


So here is my project setup

  1. A separate groovy project
  2. Multiple pipelines

All the pipeline scripts refer to the shared groovy project. I went through the shared libraries and all of the needs to be registered in Jenkins global configuration.

Is there any way to do without it? I tried using Grab but ended up with the error

java.lang.RuntimeException: No suitable ClassLoader found for grab

回答1:


Firstly for Grab to work your Jenkins needs to have access to the internet.

Shared Libraries are definitely the way to go here.

Like many things the secret sauce is in the syntax.



来源:https://stackoverflow.com/questions/46137474/jenkins-pipeline-call-functions-in-shared-jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!