我有以下设置:
我正在尝试创建一个工作来构建我的Grails 2.2.3项目。我创建了一个grails包装器,并将作业配置为使用grails包装器运行“干净”目标,以查看是否一切正常。当我运行这个工作时,问题就出现了:
...
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties content
HOME=/volume1/jenkins/jobs/sampleproject
[EnvInject] - Variables injected successfully.
[workspace] $ /volume1/jenkins/jobs/sampleproject/workspace/grailsw clean --non-interactive
Downloading http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.2.3.zip to /home/.grails/wrapper/grails-2.2.3-download.zip
Exception in thread "main" java.io.FileNotFoundException: /home/.grails/wrapper/grails-2.2.3-download.zip (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
at org.grails.wrapper.RemoteFileHelper.retrieve(RemoteFileHelper.java:49)
at org.grails.wrapper.GrailsWrapper.configureGrailsInstallation(GrailsWrapper.java:135)
at org.grails.wrapper.GrailsWrapper.main(GrailsWrapper.java:58)
Build step 'Build With Grails' marked build as failure
...
由于某种原因,我似乎无法覆盖发生FileNotFoundException的/ home /目录。它看起来像(虽然这不是我的专业知识)另一个进程是分叉的HOME环境变量设置回'/ home'。有人能指出我在哪里可以解决这个问题吗?
答案 0 :(得分:0)
所以似乎jenkins在“nobody”用户下运行,其主目录设置为“/ home”。我设法通过手动创建“/ home”目录并使用户“nobody”所有者来解决问题。
虽然我对解决方案仍然不满意,但我现在可以使用它