projects
/
tools
/
python-jenkinsapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c8eba1
)
Job API may not include in progress build in the 'builds' array. Use URL from 'lastB...
author
Bradley Harris
<bradley.harris@mapmyfitness.com>
Tue, 9 Oct 2012 17:05:10 +0000
(13:05 -0400)
committer
Bradley Harris
<bradley.harris@mapmyfitness.com>
Tue, 9 Oct 2012 17:05:10 +0000
(13:05 -0400)
jenkinsapi/job.py
patch
|
blob
|
history
diff --git
a/jenkinsapi/job.py
b/jenkinsapi/job.py
index 2dfe279c1ca5bcbce08c88ad419f300e3fbb8003..d169f766d0974c3246510843537cb64d5ba2cc28 100644
(file)
--- a/
jenkinsapi/job.py
+++ b/
jenkinsapi/job.py
@@
-150,8
+150,9
@@
class Job(JenkinsBase):
"""
Get the last build
"""
- bn = self.get_last_buildnumber()
- return self.get_build( bn )
+ buildinfo = self._data["lastBuild"]
+ return Build( buildinfo["url"], buildinfo["number"], job=self )
+
def get_last_build_or_none(self):
"""
@@
-159,7
+160,7
@@
class Job(JenkinsBase):
"""
bn = self.get_last_buildnumber()
if bn is not None:
- return self.get_
build(bn
)
+ return self.get_
last_build(
)
def get_last_completed_build( self ):
"""