txels / autojenkins

Jenkins automation scripts
http://autojenkins.readthedocs.org/
169 stars 61 forks source link

Info For Specific Build Number #3

Closed dacc closed 12 years ago

dacc commented 12 years ago

I added support for pulling info on a specific build number. Feel free to merge in if you want! No test coverage, but did a proof by "it works."

txels commented 12 years ago

Hi thanks, that's nice.

As I was reading your code, from the API point of view it might make more sense to have a single method build_info (that combines my last_buld_info and your new method) something like:

def build_info(self, jobname, build_number=None):
    """if build_number is None, get info from last build"""

Another approach could be to use absolute (n>0) or relative (n<=0) build numbers, where absolute numbers are the build numbers that Jenkins gave to the jobs (by build order), and relative means starting from last build (where 0 is last, -1 second to last...).

What do you think?

About testing: I must work on the test front myself, hopefully for next release I will add some unit test coverage and some degree of integration tests.