8 Commits

Author SHA1 Message Date
Ayoub Elhamdani
b7f0f717fc This Allow to include folders in jobs list when calling get_all_jobs()
method.
Closes-Bug: #1731903

Change-Id: Ib55d58c96f2bc4543db1b85336c04e4c6cd81021
2018-02-28 10:21:22 +00:00
Andrew Mellen
16007e0185 Sanitize url in get_info() function
Change-Id: I540f6d636e277d0ad230f844d2db6220edfb672f
Closes-Bug: #1698815
2017-09-15 18:49:20 -04:00
Chris St. Pierre
0881b20cbf Fetch all builds from a job
Jenkins only provides 100 builds of a job with the job info. This
makes python-jenkins fetch all builds when there are more than 100.

Change-Id: I326efa11c975e036b65a159414062966239c9749
2016-04-29 16:22:34 +00:00
Aliaksandr Buhayeu
f6f26ec481 Adds possibility to retrieve all jobs from the view specified
This patch adds the new `view_name` argument
to the `get_jobs` method that limits the list of jobs
returned to only those configured in the view specified.

Change-Id: I78266ed13cd6c183a2f4858458817455b79d9a23
2016-02-22 18:03:48 +03:00
Darragh Bailey
2aa1a5f1b8 Use TestWithScenarios to add additional url tests
It's important to check that we correctly handle the server url for all
API calls, so ensure that the test code uses test scenarios to cover.

Fix get_info() api call creation of url.

Change-Id: Idb0becc4c0c56df81bc5545919e530b7a77dadc9
2015-12-02 11:35:59 -08:00
Kevin L. Mitchell
244b4fed30 Allow setting the next build number
We can discover the next build number Jenkins will use for a particular
job using get_job_info(), but there's currently no way through
python-jenkins to set the next build number.  This change introduces
the set_next_build_number() method which, given a job name and a
desired number, sets the next build number of the named job to the
given number.

Limitations: Jenkins enforces that build numbers must be monotonically
increasing, but gives no indication of an error; it simply ignores the
offending value.

Change-Id: I23b5a84b7ea37d66bf778a89343e3c81ffa9ceb6
2015-09-24 10:06:05 -05:00
Jerome Hourquebie
7267eec454 Adds Cloudbees folder plugin support
This patch adds cloudbees folder plugin support. Folder should be
specified in job name : <folder>/<job>

This update also extend job_builder
(http://ci.openstack.org/jenkins-job-builder/) tool without any
modification.

Change-Id: I6d3957c217e1253e53152d90d5fcce5e69c77674
Co-Authored-By: Darragh Bailey <daragh.bailey@gmail.com>
2015-09-21 18:25:35 +01:00
Darragh Bailey
c58ae7e1af Separate tests in separate files and classes
Split existing tests into separate files and classes to make it easier
to select a subset to be executed when making modifications.

Add some simple consolidations of test data as example improvements that
can be extended by consolidating complete tests or sets of tests.

Change-Id: If2380e6f4e848ba68f05868e2ef4186d7912952b
2015-08-25 01:11:47 +01:00