Jenkins script console Exercise 2: String, List via command line Exercise 3: Groovy Exercise 4: Learn how to use module json to dump data Exercise 5: Generate online NASDAQ data using json Jenkins Scriptler in 90 minutes 2
to trouble-shooting and diagnostics or routing tasks in jenkins Provides a way to share scripts between users via hosted script catalogs on the internet. Install plugin Use http://<jenkins job>/scriptler/ or Jenkins -> Scriptler (system menu) Jenkins Scriptler in 90 minutes 3 https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin
data and manipulate directly Jenkins script use Groovy, which is an agile and dynamic language for the Java Virtual Machine a.k.a java-like script language over JVM Jenkins Scriptler in 90 minutes 4
java instance ji = jenkins.model.Jenkins.instance All the items (include jobs) jobs = ji.items Printout the job names started with “test” Jenkins Scriptler in 90 minutes 6
API to access internal data http://javadoc.jenkins-ci.org/ Jenkins instance is http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html Then locate “getAllItems()” API Jenkins Scriptler in 90 minutes 7
Item API and try to printout the url for the jobs If needed, check the source code if java developers https://github.com/jenkinsci/jenkins/blob/master/core/src/main/ Otherwise Check samples ;-) Jenkins Scriptler in 90 minutes 8