无法在jenkins中生成脚本文件

时间:2016-01-14 09:26:48

标签: javascript node.js jenkins jenkins-plugins jenkins-cli

我正在使用jenkins定期构建我的node.js应用程序。每当我尝试构建我的应用程序时,我都会在控制台输出上得到它



Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/workspace
FATAL: Unable to produce a script file
java.io.IOException: Failed to create a temp file on /Users/Shared/Jenkins/Home/workspace
	at hudson.FilePath.createTextTempFile(FilePath.java:1383)
	at jenkins.plugins.nodejs.NodeJsCommandInterpreter.createScriptFile(NodeJsCommandInterpreter.java:108)
	at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:57)
	at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
	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:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: Failed to create a temporary directory in /Users/Shared/Jenkins/tmp
	at hudson.FilePath$17.invoke(FilePath.java:1369)
	at hudson.FilePath$17.invoke(FilePath.java:1357)
	at hudson.FilePath.act(FilePath.java:991)
	at hudson.FilePath.act(FilePath.java:969)
	at hudson.FilePath.createTextTempFile(FilePath.java:1357)
	... 12 more
Caused by: java.io.IOException: Permission denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createTempFile(File.java:2024)
	at hudson.FilePath$17.invoke(FilePath.java:1367)
	... 16 more
Build step 'Execute NodeJS script' marked build as failure
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Triggering a new build of job2
Triggering a new build of job2
Finished: FAILURE




这可能是什么原因? 谢谢!

2 个答案:

答案 0 :(得分:2)

除了检查权限外,还要确保机器上有空闲空间,试图保存日志/执行jenkins工作。

答案 1 :(得分:1)

检查脚本尝试创建新文件/文件夹的文件夹的权限。 原因可能是您运行构建脚本的用户没有在该目录中创建新文件的权限。