,所以我的工作在詹金斯種子的工作,現在和我得到這個錯誤詹金斯種子工作(沒有這樣的文件或目錄)
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腳本試圖從主節點工作目錄讀取而不是從屬工作區。 –