Class: SimpleJenkins::Job

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_jenkins/job.rb

Instance Method Summary collapse

Instance Method Details

#running?Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/simple_jenkins/job.rb', line 93

def running?
  lastBuild.running?
end

#stateObject



82
83
84
85
86
87
88
89
90
91
# File 'lib/simple_jenkins/job.rb', line 82

def state
  case color
  when /disabled/
    'DISA'
  when /red/
    'FAIL'
  else
    'SUCC'
  end
end

#success?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/simple_jenkins/job.rb', line 97

def success?
  lastCompletedBuild.success?
end

#urlObject



78
79
80
# File 'lib/simple_jenkins/job.rb', line 78

def url
  URI::encode(@url)
end