2015-07-10 58 views

回答

3

您可以通過訪問http://jenkins:8080/cli來獲取Jenkins CLI支持的命令列表。

詹金斯CLI提供list-changes命令:

$ java -jar jenkins-cli.jar -s http://jenkins:8080/ help list-changes 

java -jar jenkins-cli.jar list-changes JOB RANGE [-format [XML | CSV | PLAIN]] 
Dumps the changelog for the specified build(s). 
JOB       : Name of the job to build 
RANGE      : Range of the build records to delete. 'N-M', 
           'N,M', or 'N' 
-format [XML | CSV | PLAIN] : Controls how the output from this command is 
           printed. 

「的製造記錄範圍,刪除」應改爲「範圍的製造記錄列出更改」

對於示例:

$ java -jar jenkins-cli.jar -s http://jenkins:8080/ list-changes XYZ 101-104 
+0

感謝您的回覆,我會嘗試。 –

+0

感謝戴夫,它的工作就像魅力!但是,它顯示了所有已更改的文件,但未顯示修訂版本號。如何得到這個? –

+0

如果我使用-format XML,現在可以獲取修訂號 –