小编Tim*_* L.的帖子

Jenkins的代理配置不适用于常规的管道脚本吗?

当前,我面临的问题是我试图在代理后面建立S4SDK jenkins管道。

为此,我相应地调整了server.cfg中的配置,并且在Jenkins服务器日志中也显示使用了此配置:

Setting Jenkins network proxy to <IP of proxy>:<port of proxy> without using credentials. No proxy patterns: [*localhost, *127.0.0.1, *s4sdk-nexus]
Run Code Online (Sandbox Code Playgroud)

但是,在管道执行期间,更具体地说,在最后执行s4sdkQualityChecks时,checkHystrix.groovy脚本使用grapes提取另一个依赖项:

@Grab('com.xlson.groovycsv:groovycsv:1.1')
Run Code Online (Sandbox Code Playgroud)

但是,无法解决此依赖关系,并显示以下堆栈跟踪:

org.jenkinsci.plugins.workflow.cps.CpsCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.xlson.groovycsv#groovycsv;1.1: not found]

java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: com.xlson.groovycsv#groovycsv;1.1: not found]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
    at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
    at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:424)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at …
Run Code Online (Sandbox Code Playgroud)

sap-cloud-sdk

7
推荐指数
1
解决办法
947
查看次数

标签 统计

sap-cloud-sdk ×1