Merge lp://staging/~kenrumer/python-jenkins/build_info into lp://staging/~python-jenkins-developers/python-jenkins/trunk

Proposed by Ken Rumer
Status: Merged
Merged at revision: 13
Proposed branch: lp://staging/~kenrumer/python-jenkins/build_info
Merge into: lp://staging/~python-jenkins-developers/python-jenkins/trunk
Diff against target: 73 lines (+38/-0)
2 files modified
doc/index.rst (+10/-0)
jenkins/__init__.py (+28/-0)
To merge this branch: bzr merge lp://staging/~kenrumer/python-jenkins/build_info
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+95243@code.staging.launchpad.net

Commit message

Added build info method

Description of the change

Try this again.

Gets build information from Jenkins. Can use to get the status of a build. Loop until the build is complete, return the artifact URL(s).

Example usage:
     import jenkins
     import time
     j = jenkins.Jenkins('http://'+kwargs['ci_host']+':'+kwargs['ci_port'], kwargs['ci_username'], kwargs['ci_password'])

    next_build_number = j.get_job_info('build_'+kwargs['vcs_server_type'])['nextBuildNumber']

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Thanks for re-doing this merge proposal Ken.

A few comments:

1) Please could you add documentation to the method in the python code as well as index.rst - helps folk who 'pydoc jenkins'.

2) The string handling for errors is inconsistent with the rest of the package:

Please use:

  raise JenkinsException('job[%s] number[%d] does not exist'%(name, number))

instead of:

  raise JenkinsException('job[!s] number[!d] does not exist'.format(name, number))

I appreciate that both produce the same result but I would like to keep the package consistent.

Other than that looks good - I'll merge once you have made the above amendments.

Cheers

James

review: Needs Fixing
Revision history for this message
Ken Rumer (kenrumer) wrote :

Cool, thanks for the info
On Mar 1, 2012 2:05 AM, "James Page" <email address hidden> wrote:

> Review: Needs Fixing
>
> Thanks for re-doing this merge proposal Ken.
>
> A few comments:
>
> 1) Please could you add documentation to the method in the python code as
> well as index.rst - helps folk who 'pydoc jenkins'.
>
> 2) The string handling for errors is inconsistent with the rest of the
> package:
>
> Please use:
>
> raise JenkinsException('job[%s] number[%d] does not exist'%(name, number))
>
> instead of:
>
> raise JenkinsException('job[!s] number[!d] does not exist'.format(name,
> number))
>
> I appreciate that both produce the same result but I would like to keep
> the package consistent.
>
> Other than that looks good - I'll merge once you have made the above
> amendments.
>
> Cheers
>
> James
>
> --
> https://code.launchpad.net/~kenrumer/python-jenkins/build_info/+merge/95243
> You are the owner of lp:~kenrumer/python-jenkins/build_info.
>

14. By Ken Rumer

Updated documentation, updated error handler for consistency

Revision history for this message
James Page (james-page) wrote :

+1 LGTM

review: Approve
Revision history for this message
Ken Rumer (kenrumer) wrote :

LinkedIn
------------

I'd like to add you to my professional network on LinkedIn.

- Ken

Ken Rumer
Senior Infrastructure Architect at Level 3 Communications
Greater Denver Area

Confirm that you know Ken Rumer:
https://www.linkedin.com/e/ndq7z5-h3w07ta4-4p/isd/7630157916/Wp-_FT85/?hs=false&tok=1ZVl6N6uxhYBg1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/ndq7z5-h3w07ta4-4p/XtL1dnmsjKkORxJNXvUC0wrvDLrNPW1l9IVJGpYK8D/goo/mp%2B95243%40code%2Elaunchpad%2Enet/20061/I2583562695_1/?hs=false&tok=1qAnWDFTdhYBg1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches