Lao Li share: Continuous integration Learn jenkins inside command
Jenkins Command Invocation method: Call the Jenkins command to set the job description information.
$JAVA _bin-jar "$JENKINS _cli_jar"-S "$JENKINS _url" Set-build-description "${job_name}" "${build_number}" "$tag _name"- -username "$SVN _username"--password "$SVN _password"
If you already have a Jenkins server on hand, you can also access your Jenkins and see the help through the jenkins-manage jenkins-jenkins CLI page, as follows:
<a href= "http://i.minus.com/jk81S4rpmGc2n.jpg" target= "_blank" class= "cboxelement" rel= "example4" 2881 "=" "style= "Text-decoration:none; Color:rgb (1, 150, 227); " >
Jenkins command line mode:Java-jar Jenkins-cli.jar [-S Jenkins_url] command [Options ...] [Arguments ...]
<available commands>
Build
Builds a job, and optionally waits until its completion.
Cancel-quiet-down:
Cancel the effect of the "Quiet-down" command.
Clear-queue:
Clears the build queue
Connect-node:
Reconnect to a node
Copy-job:
Copies a job.
Create-job:
Creates a new job by reading stdin as a configuration XML file.
Delete-builds:
Deletes build record (s).
Delete-job:
Deletes a job
Delete-node:
Deletes a node
Disable-job:
Disables a job
Disconnect-node:
Disconnects from a node
Dist-fork:
Forks a process on a remote machine and connects to its stdin/stdout
Enable-job:
Enables a job
Get-job:
Dumps the job definition XML to stdout
Groovy:
Executes the specified Groovy script.
Groovysh:
Runs an interactive groovy shell.
Help
Lists all the available commands.
Install-plugin:
Installs a plugin either from a file, an URL, or from Update center.
Install-tool:
Performs automatic tool installation, and print its location to stdout. Can is only called from inside a build.
Keep-build:
Mark the build to keep the build forever.
List-changes:
Dumps the changelog for the specified build (s).
Login
Saves the current credential to allow a future commands to run without explicit credential information.
Logout
Deletes the credential stored with the login command.
Mail
Reads stdin and sends as an e-mail.
Offline-node:
Stop using a node for performing builds temporarily, until the next "online-node" command.
Online-node:
Resume using a node for performing builds, to cancel the earlier "Offline-node" command.
Quiet-down:
Quiet down Jenkins, in preparation for a restart. Don ' t start any builds.
Reload-configuration:
Discard all the loaded data in memory and reload everything from the file system. Useful when you modified config files directly on disk.
Restart
Restart Jenkins
Safe-restart:
Safely restart Jenkins
Safe-shutdown:
Puts Jenkins into the quiet mode, wait for existing builds to is completed, and then shut down Jenkins.
Set-build-description:
Sets the description of a build.
Set-build-display-name:
Sets the displayName of a build
Set-build-result:
Sets the result of the current build. Works only if invoked from within a build.
Shutdown
Immediately shuts down Jenkins server
Update-job:
Updates the job definition XML from stdin. The opposite of the Get-job command
Version
Outputs the current version.
Wait-node-offline:
Wait for a node to become offline
Wait-node-online:
Wait for a node to become online
Who-am-i:
Reports your credential and permissions
Original link: http://www.cnblogs.com/laoli0201
Lao Li share: Continuous integration Learn jenkins inside command