python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00627
[Bug 1888547] Re: lastBuild/api/json
LAST_BUILD_INFO =
'%(folder_url)sjob/%(short_name)s/lastBuild/api/json?depth=%(depth)s'
def get_last_build_info(self, name, number=0, depth=0):
folder_url, short_name = self._get_job_folder(name)
try:
response = self.jenkins_open(requests.Request(
'GET', self._build_url(LAST_BUILD_INFO, locals())
))
if response:
return json.loads(response)
else:
raise JenkinsException('job[%s] number[%d] does not exist'
% (name, number))
except (req_exc.HTTPError, NotFoundException):
raise JenkinsException('job[%s] number[%d] does not exist'
% (name, number))
except ValueError:
raise JenkinsException(
'Could not parse JSON info for job[%s] number[%d]'
% (name, number)
)
--
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1888547
Title:
lastBuild/api/json
Status in Python Jenkins:
New
Bug description:
This jenkins api not have [lastBuild/api/json] function
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1888547/+subscriptions
References