,所以我的工作在詹金斯种子的工作,现在和我得到这个错误詹金斯种子工作(没有这样的文件或目录)
Processing DSL script testDSLAuto.groovy
FATAL: /pathto/weblogic-apps-auto.csv (No such file or directory)
java.io.FileNotFoundException: /pathto/weblogic-apps-auto.csv (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
我真的不知道为什么这样的错误会造成。为了测试,我在文件上做了一个chmod 777。它也发现我的.groovy文件在奇怪的同一个工作区中。我为groovy文件使用相对路径,并为.csv文件尝试了相同的操作。
我也执行了一个shell脚本,当我运行我的工作,所以你可以看到它在工作区。
+ pwd
/home/jenkins/workspace/Denver_Jenkins/SeedJob-CreateAutoBuilds
+ ls -l
total 32
-rwx------ 1 jenkins jenkins 6504 Jun 14 22:11 testDSLAuto.groovy
-rwxrwxrwx 1 jenkins jenkins 20496 Jun 14 20:00 weblogic-apps-auto.csv
这是正确的。我的groovy脚本试图从主节点工作目录读取而不是从属工作区。 –