我正在尝试在远程计算机上设置Jenkins。我已安装并准备好了但是当我尝试运行我的工作时,我收到以下错误:
Started by user anonymous
Building in workspace C:\Program Files\Jenkins\"C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
java.io.IOException: Failed to mkdirs: C:\Program Files\Jenkins\"C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
at hudson.FilePath.mkdirs(FilePath.java:1093)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1247)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1740)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: tS@web.com
Error sending to the following VALID addresses: tS@web.com
Finished: FAILURE
有人知道为什么会这样吗?
答案 0 :(得分:2)
这一行告诉你一切:
Building in workspace C:\Program Files\Jenkins\"C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
无论你怎么看,上述都不是一条有效的道路。如果没有看到你的配置(你没有提供任何......),我们只能猜到你搞砸了。
所以,我们猜测:
C:\Program Files\Jenkins\
为JENKINS_HOME
。 C:\Program Files\Jenkins\jobs\[jobname]\workspace
,即%JENKINS_HOME%\jobs\%JOB_NAME%\workspace
workspace
。所以你肯定试图改变工作区的位置。 "C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
行(带有引号)某处您应该没有的行。让我们继续猜测。 "C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
,它不会将它作为绝对路径,并认为它是相对路径,相对路径从%JENKINS_HOME%
开始,这将解释你的{{1}错误C:\Program Files\Jenkins\"C:\Documents and Settings\Administrator\My Documents\pbnb_cli"
,这样就可以了。C:\Documents and Settings\Administrator\My Documents\pbnb_cli
之类的东西。这可以解释你当前的状态。${JENKINS_HOME}"C:\Documents and Settings\Administrator\My Documents\pbnb_cli"