小编Med*_*aim的帖子

在jenkins中运行命令shell

我正在尝试在Jenkins中执行命令shell,我正在使用Windows 7.在控制台输出中,我有这样的:

Building in workspace C:\Program Files (x86)\Jenkins\workspace\test
[test] $ sh -xe C:\Windows\TEMP\hudson6299483223982766034.sh
The system cannot find the file specified

FATAL: L'exécution de la commande a échoué.
java.io.IOException: Cannot run program "sh" (in directory "C:\Program Files (x86)\Jenkins\workspace\test"): CreateProcess error=2, Le fichier spécifié est introuvable
    at java.lang.ProcessBuilder.start(Unknown Source)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
    at hudson.Launcher$ProcStarter.start(Launcher.java:382)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:97)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.build(Build.java:205)
    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
    at hudson.model.Run.execute(Run.java:1744)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Caused by: java.io.IOException: …
Run Code Online (Sandbox Code Playgroud)

shell command build ioexception jenkins

21
推荐指数
4
解决办法
9万
查看次数

为什么使用人工而不是共享文件夹?

在这种情况下,当我们放置应用程序的安装程序时,公司中有一个共享文件夹(两个.sh文件用于bin,另一个用于conf),这是手动操作。

我们正在尝试让詹金斯自动执行此操作。

我必须提供一些论据:如果我们使用人工方法通过带有http请求的jenkis发送数据来存储数据,那加号是什么?我们可以自动执行将数据放入共享文件夹的操作(如果您可以告诉我更多有关执行此最后一个操作的可能性的信息,那将会很棒)

有任何想法吗?

shared-directory artifactory continuous-delivery

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