創建任務用下面命令行沒問題
java -jar hudson-cli.jar -s http://127.0.0.1:8080/hudson create-job myTestjob < config.xml
能夠成功
但是更新項目必須用0 < config.xml
java -jar hudson-cli.jar -s http://127.0.0.1:8080/hudson update-job myTestjob < config.xml
報錯
Argument "CREATE" is required
java -jar hudson-cli.jar update-job args...
Updates and potentionally creates a job by reading stdin as a configuration XML file.
NAME : Name of the job to update
CREATE : Create the job if needed
java -jar hudson-cli.jar -s http://127.0.0.1:8080/hudson update-job myTestjob 0 < config.xml
這樣就沒問題了, config.xml里面的內容必須填的需要有,否則要報異常,具體要有哪些項,大家創建個項目在網頁上把所有的都填空,然后去看項目下的config.xml就知道了
在C:\Users\××××\.hudson\jobs
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。