qileilove

          blog已經轉移至github,大家請訪問 http://qaseven.github.io/

          使用命令行方式管理你的Jenkins

          Jenkins保留了一套內嵌命令行,允許你通過Shell腳本方式訪問Jenkins并進行管理,這就極大的方便了一些日常自動化任務,包括故障診斷等等。

          詳細信息請參看官方WikiJenkins-CLI

          當然,如果你手頭已經搭建了一臺Jenkins服務器,那么你也可以訪問你的Jenkins,然后通過Jenkins - Manage Jenkins - Jenkins CLI頁面查看相關幫助,如下圖:


          Jenkins的命令行方式:

          1. java -jar jenkins-cli.jar [-s JENKINS_URL] command [options...] [arguments...]

          所有參數:

          1. <Available Commands>
          2.   
          3.   
          4. build:   
          5.         Builds a job, and optionally waits until its completion.   
          6.   
          7. cancel-quiet-down:   
          8.         Cancel the effect of the "quiet-down" command.   
          9.   
          10. clear-queue:   
          11.         Clears the build queue   
          12.   
          13. connect-node:   
          14.         Reconnect to a node   
          15.   
          16. copy-job:   
          17.         Copies a job.   
          18.   
          19. create-job:   
          20.         Creates a new job by reading stdin as a configuration XML file.   
          21.   
          22. delete-builds:   
          23.         Deletes build record(s).   
          24.   
          25. delete-job:   
          26.         Deletes a job   
          27.   
          28. delete-node:   
          29.         Deletes a node   
          30.   
          31. disable-job:   
          32.         Disables a job   
          33.   
          34. disconnect-node:   
          35.         Disconnects from a node   
          36.   
          37. dist-fork:   
          38.         forks a process on a remote machine and connects to its stdin/stdout   
          39.   
          40. enable-job:   
          41.         Enables a job   
          42.   
          43. get-job:   
          44.         Dumps the job definition XML to stdout   
          45.   
          46. groovy:   
          47.         Executes the specified Groovy script.    
          48.   
          49. groovysh:   
          50.         Runs an interactive groovy shell.   
          51.   
          52. help:   
          53.         Lists all the available commands.   
          54.   
          55. install-plugin:   
          56.         Installs a plugin either from a file, an URL, or from update center.    
          57.   
          58. install-tool:   
          59.         Performs automatic tool installation, and print its location to stdout. Can be only called from inside a build.   
          60.   
          61. keep-build:   
          62.         Mark the build to keep the build forever.   
          63.   
          64. list-changes:   
          65.         Dumps the changelog for the specified build(s).   
          66.   
          67. login:   
          68.         Saves the current credential to allow future commands to run without explicit credential information.   
          69.   
          70. logout:   
          71.         Deletes the credential stored with the login command.    
          72.   
          73. mail:   
          74.         Reads stdin and sends that out as an e-mail.   
          75.   
          76. offline-node:   
          77.         Stop using a node for performing builds temporarily, until the next "online-node" command.   
          78.   
          79. online-node:   
          80.         Resume using a node for performing builds, to cancel out the earlier "offline-node" command.   
          81.   
          82. quiet-down:   
          83.         Quiet down Jenkins, in preparation for a restart. Don't start any builds.   
          84.   
          85. reload-configuration:   
          86.         Discard all the loaded data in memory and reload everything from file system. Useful when you modified config files directly on disk.   
          87.   
          88. restart:   
          89.         Restart Jenkins   
          90.   
          91. safe-restart:   
          92.         Safely restart Jenkins   
          93.   
          94. safe-shutdown:   
          95.         Puts Jenkins into the quiet mode, wait for existing builds to be completed, and then shut down Jenkins.   
          96.   
          97. set-build-description:   
          98.         Sets the description of a build.   
          99.   
          100. set-build-display-name:   
          101.         Sets the displayName of a build   
          102.   
          103. set-build-result:   
          104.         Sets the result of the current build. Works only if invoked from within a build.   
          105.   
          106. shutdown:   
          107.         Immediately shuts down Jenkins server   
          108.   
          109. update-job:   
          110.         Updates the job definition XML from stdin. The opposite of the get-job command   
          111.   
          112. version:   
          113.         Outputs the current version.   
          114.   
          115. wait-node-offline:   
          116.         Wait for a node to become offline   
          117.   
          118. wait-node-online:   
          119.         Wait for a node to become online   
          120.   
          121. who-am-i:   
          122.         Reports your credential and permissions  

          posted on 2014-02-17 16:08 順其自然EVO 閱讀(611) 評論(0)  編輯  收藏 所屬分類: 持續集成

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 田林县| 磐安县| 张北县| 航空| 金沙县| 大姚县| 宝清县| 讷河市| 柳河县| 西畴县| 珲春市| 庆城县| 洱源县| 罗源县| 思茅市| 固始县| 邵阳市| 安新县| 洛浦县| 阳原县| 民乐县| 双江| 潜山县| 霸州市| 连州市| 乌拉特中旗| 渭源县| 平远县| 昌图县| 囊谦县| 年辖:市辖区| 通榆县| 饶平县| 宣化县| 隆林| 通江县| 黄平县| 察哈| 东海县| 台北县| 克东县|