如您所知,在 Jenkins 的共享库中,可以通过执行以下操作来加载资源(位于资源文件夹中):
libraryResource("script.sh")
Run Code Online (Sandbox Code Playgroud)
现在我的用例是我想在资源下的文件夹中加载多个文件:
+ resources
+ teamA
+ script1.sh
+ script2.sh
Run Code Online (Sandbox Code Playgroud)
我想在做任何事情之前加载所有这些文件:我在共享库中做了一个方法:
+ resources
+ teamA
+ script1.sh
+ script2.sh
Run Code Online (Sandbox Code Playgroud)
在哪里 scriptsFolder= "teamA"
我当然得到java.io.IOException: Is a directory
因为libraryResource必须得到一个文件路径参数。
那么,有没有一种方法可以在不知道名称或编号的情况下加载所有这些文件?
asadmin start-domain domain1
Run Code Online (Sandbox Code Playgroud)
但它显示了这个错误。
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Run Code Online (Sandbox Code Playgroud)
我搜索并发现它可能是主机名或端口被其他应用程序或服务器使用,实际上它被 TCP 使用。
我对主机名没有问题,所以我通过更改端口尝试了这个解决方案。
asadmin set server.http-service.http-listener.http-listener-1.port=10080
Run Code Online (Sandbox Code Playgroud)
但它显示了这个错误
remote failure: No configuration found for server.http-service.http-listener.http-listener-1
Command set failed.
Run Code Online (Sandbox Code Playgroud)
我不明白为什么。