sensu-plugins-jenkins 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75c39b7e5b5565b722528e10fb11058718cc4a3269c6ed5681addfb89407b9cb
4
- data.tar.gz: b3d3ca9c8db98a107638ece7e80ac90619cca58dfe892a403f5c672aa83f4f7e
3
+ metadata.gz: 2a7c289a5f7d30cad70b58c49ad65d08f8274abac1a5e5f9a77b7e3bb2fdd986
4
+ data.tar.gz: 09b3d1743357462c31c9e87024f3c62e1c9d72f061e837e55eea677270277463
5
5
  SHA512:
6
- metadata.gz: b78f035d9c4665fd24d04396f4747648de3391ff65311e61c85260a798f538676975f51eac261fe0e85c5a2b58f547695355d7c4602efddf0bf80848ab69e7eb
7
- data.tar.gz: 0372069eeb99cdc1d30098c4b6d0be30880acd803fa75fd1e008d912e12fe152904793e9b8bdf9b168395a11d3240454440ef878ee7df662556cb8a04fa1c62d
6
+ metadata.gz: 5bd91fca8f21d3d69d5e48dfe2be5990e7a3dbbbc94fdb9281747ee2fafc430133a8de522bc700907444ee8c8daed38153861488811a84c3e20804ce2217c1fd
7
+ data.tar.gz: 8025d3b36b732156b185cf2249f7c99bbf50eb8ab78bbbf95819382fbaa1a33fbe168bcbaf5e95131a34c4e5e73855f3139f8d3fb43354b821973a238188b04a
@@ -6,6 +6,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.7.1] - 2018-06-10
10
+ ### Fixed
11
+ - check-jenkins-job-status.rb: fix issue when multiple builds are currently running (@CoRfr)
12
+
9
13
  ## [1.7.0] - 2018-05-14
10
14
  ### Added
11
15
  - check-jenkins-build-time.rb: add `--check-build-duration` mode to check duration (@CoRfr)
@@ -100,7 +104,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
100
104
  ### Added
101
105
  - initial release
102
106
 
103
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.7.0...HEAD
107
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.7.1...HEAD
108
+ [1.7.1]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.7.0...1.7.1
104
109
  [1.7.0]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.6.2...1.7.0
105
110
  [1.6.2]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.6.1...1.6.2
106
111
  [1.6.1]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.6.0...1.6.1
@@ -110,9 +110,10 @@ class JenkinsJobChecker < Sensu::Plugin::Check::CLI
110
110
  status = jenkins_api_client.job.get_current_build_status(job_name)
111
111
  # If the job is currently running, get the status of the last build instead
112
112
  if status == 'running'
113
- last_build = jenkins_api_client.job.get_current_build_number(job_name) - 1
114
- build = jenkins_api_client.job.get_build_details(job_name, last_build)
115
- status = build['result'].downcase
113
+ build = jenkins_api_client.job.get_build_details(job_name, 'lastCompletedBuild')
114
+ if build && build['result']
115
+ status = build['result'].downcase
116
+ end
116
117
  end
117
118
  status
118
119
  rescue
@@ -2,7 +2,7 @@ module SensuPluginsJenkins
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 7
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-jenkins
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-15 00:00:00.000000000 Z
11
+ date: 2018-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  requirements: []
266
266
  rubyforge_project:
267
- rubygems_version: 2.7.6
267
+ rubygems_version: 2.7.7
268
268
  signing_key:
269
269
  specification_version: 4
270
270
  summary: Sensu plugins for jenkins