class Object
Constants
- AUTH
- JENK
- URL
Public Instance Methods
CreateFromJob(jobname, newjobname)
click to toggle source
# File lib/test.rb, line 27 def CreateFromJob(jobname, newjobname) job = JENK.get_job(jobname) job2 = job.copy(newjobname) print "#{job2.name}\n" end
GetBuildInfo(jobname, buildnum)
click to toggle source
# File lib/test.rb, line 33 def GetBuildInfo(jobname, buildnum) job = JENK.get_job(jobname) bld = job.get_build(buildnum) return bld end
GetConfig(jobname)
click to toggle source
# File lib/test.rb, line 39 def GetConfig(jobname) job = JENK.get_job(jobname) return job.get_config() end
GetInfo(jobname)
click to toggle source
# File lib/test.rb, line 48 def GetInfo(jobname) def pretty_print(entry, tab=1) if entry.kind_of? Hash entry.keys.each do |k| print " " * tab * 2 print "#{k} ----> \n" pretty_print(entry[k], tab=tab+1) end elsif entry == nil print " " * tab * 2 print "[NONE]\n" elsif entry.kind_of? Array entry.each do |v| pretty_print(v, tab+1) end else print "\t" * tab print "#{entry}\n" end end job = JENK.get_job(jobname) job.info.keys.each do |k| print "#{k} ----> \n" pretty_print job.info[k] end end
GetJob(jobname)
click to toggle source
# File lib/test.rb, line 44 def GetJob(jobname) return JENK.get_job(jobname) end
ListAll()
click to toggle source
# File lib/test.rb, line 14 def ListAll() jobs = JENK.all_jobs() if jobs jobs.each do |jb| print "#{jb.name} --> #{jb.get_url}\n" print "DisplayName: #{jb.get_displayName}\n" jb.info_items.each do |i| puts i end end end end
pretty_print(entry, tab=1)
click to toggle source
# File lib/test.rb, line 49 def pretty_print(entry, tab=1) if entry.kind_of? Hash entry.keys.each do |k| print " " * tab * 2 print "#{k} ----> \n" pretty_print(entry[k], tab=tab+1) end elsif entry == nil print " " * tab * 2 print "[NONE]\n" elsif entry.kind_of? Array entry.each do |v| pretty_print(v, tab+1) end else print "\t" * tab print "#{entry}\n" end end