用Grails构建

时间:2019-06-24 04:09:21

标签: jenkins grails permission-denied

在天青云环境中尝试在jenkins中的CI / CD grails项目中进行CI / CD时,据说无法执行grillsw文件。当我应用sudo chmod 755命令并运行jenkins作业时,权限将恢复原状,并且会发生相同的错误。有人解决过这样的问题吗?我想要你的建议。

[DevOps_Test_Clone] $ /var/lib/jenkins/workspace/DevOps_Test_Clone/grailsw -Dgrails.work.dir=/var/lib/jenkins/workspace/DevOps_Test_Clone//target -Dgrails.env=test war --non-interactive --plain-output
FATAL: command execution failed
java.io.IOException: Cannot run program "/var/lib/jenkins/workspace/DevOps_Test_Clone/grailsw" (in directory "/var/lib/jenkins/workspace/DevOps_Test_Clone"): error=13, Permission denied
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:249)
    at hudson.Proc$LocalProc.<init>(Proc.java:218)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
    at hudson.Launcher$ProcStarter.start(Launcher.java:455)
    at hudson.Launcher$ProcStarter.join(Launcher.java:466)
    at com.g2one.hudson.grails.GrailsBuilder.perform(GrailsBuilder.java:266)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
    at hudson.model.Build$BuildExecution.build(Build.java:206)
    at hudson.model.Build$BuildExecution.doRun(Build.java:163)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
    at hudson.model.Run.execute(Run.java:1818)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: error=13, Permission denied
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 15 more
Build step 'Build With Grails' marked build as failure
Finished: FAILURE

0 个答案:

没有答案