From Fedora Project Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
|setup= | |setup= | ||
# ensure that the Jenkins is up and running | # ensure that the Jenkins is up and running | ||
# | # this test case depends on [https://fedoraproject.org/wiki/Msrb:TestDay/Test_2 freestyle project] test case | ||
|actions= | |actions= | ||
# try to run: <code>jenkins-cli -s http://localhost:8080/ help</code> | # try to run: <code>jenkins-cli -s http://localhost:8080/ help</code> | ||
Line 33: | Line 33: | ||
groovy:000> | groovy:000> | ||
</pre> | </pre> | ||
# try to run some Groovy code, for example: <code>uname -a".execute().text</code> | # try to run some Groovy code, for example: <code>"uname -a".execute().text</code> | ||
# type "quit" to quit the Groovy shell | # type "quit" to quit the Groovy shell | ||
|results= | |results= | ||
# there should be no failures or stacktraces printed on stdout/stderr | # there should be no failures or stacktraces printed on stdout/stderr | ||
}} | }} |
Latest revision as of 11:59, 30 September 2014
Description
Try to interact with Jenkins from command-line.
Setup
- ensure that the Jenkins is up and running
- this test case depends on freestyle project test case
How to test
- try to run:
jenkins-cli -s http://localhost:8080/ help
- you should see list of all available commands
- try to run:
jenkins-cli -s http://localhost:8080/ list-jobs
- you should see a list of all projects:
project1
- try to run:
jenkins-cli -s http://localhost:8080/ build project1 -s -v
- this should fire a new build of "project1":
Started project1 #2 Started by command line by anonymous Building in workspace /var/lib/jenkins/jobs/project1/workspace [workspace] $ /bin/sh -xe /tmp/hudson7729477737891392405.sh + echo 'Build Successful!' Build Successful! Finished: SUCCESS Completed project1 #2 : SUCCESS
- try to run
jenkins-cli -s http://localhost:8080/ groovysh
- you should see a Groovy shell prompt:
Groovy Shell (1.8.9, JVM: 1.8.0_11) Type 'help' or '\h' for help. ------------------------------------------------------------------------------- groovy:000>
- try to run some Groovy code, for example:
"uname -a".execute().text
- type "quit" to quit the Groovy shell
Expected Results
- there should be no failures or stacktraces printed on stdout/stderr