Jenkins Pipeline-共享jar中的调用函数 [英] Jenkins Pipeline - Call functions in shared jar

查看:470
本文介绍了Jenkins Pipeline-共享jar中的调用函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的项目设置

  1. 一个单独的常规项目
  2. 多个管道

所有管道脚本均引用共享的groovy项目.我浏览了共享库,并在Jenkins全局配置中注册了所有需求.

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.

没有它,有什么办法吗?我尝试使用Grab,但最终出现错误

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

推荐答案

首先,为了让Grab正常工作,您的Jenkins需要能够访问互联网.

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.

这篇关于Jenkins Pipeline-共享jar中的调用函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆