-
Notifications
You must be signed in to change notification settings - Fork 4
/
PKG-INFO
226 lines (159 loc) · 9.3 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
Metadata-Version: 1.1
Name: jenkinsapi
Version: 0.3.11
Summary: A Python API for accessing resources on a Jenkins continuous-integration server.
Home-page: UNKNOWN
Author: Salim Fadhley, Aleksey Maksimov
Author-email: [email protected], [email protected]
License: MIT
Description: jenkinsapi
==========
.. image:: https://badge.fury.io/py/jenkinsapi.png
:target: http://badge.fury.io/py/jenkinsapi
.. image:: https://travis-ci.com/pycontribs/jenkinsapi.png?branch=master
:target: https://travis-ci.com/pycontribs/jenkinsapi
.. image:: https://codecov.io/gh/pycontribs/jenkinsapi/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pycontribs/jenkinsapi
.. image:: https://requires.io/github/pycontribs/jenkinsapi/requirements.png?branch=master
:target: https://requires.io/github/pycontribs/jenkinsapi/requirements/?branch=master
:alt: Requirements Status
About this library
-------------------
Jenkins is the market leading continuous integration system, originally created by Kohsuke Kawaguchi.
Jenkins (and It's predecessor Hudson) are useful projects for automating common development tasks (e.g. unit-testing, production batches) - but they are somewhat Java-centric. Thankfully the designers have provided an excellent and complete REST interface. This library wraps up that interface as more conventional python objects in order to make many Jenkins oriented tasks easier to automate.
This library allows you to automate most common Jenkins operations using Python, such as:
* Ability to add/remove/query Jenkins jobs
* Ability to execute jobs and:
* Query the results of a completed build
* Block until jobs are complete or run jobs asyncronously
* Get objects representing the latest builds of a job
* Work with build artifacts:
* Search for artifacts by simple criteria
* Install artifacts to custom-specified directory structures
* Ability to search for builds by source code revision
* Ability to add/remove/query:
* Slaves (Webstart and SSH slaves)
* Views (including nested views using NestedViews Jenkins plugin)
* Credentials (username/password and ssh key)
* Username/password auth support for jenkins instances with auth turned on
* Ability to script jenkins installation including plugins
For a full documentation spec of what this library supports see: http://jenkinsapi.readthedocs.io/en/latest/index.html
Python versions
---------------
The project has been tested against Python versions:
* 2.7
* 3.4
* 3.5
* 3.6
* 3.7
Jenkins versions
----------------
Project tested on both stable (LTS) and latest Jenkins versions.
Known issues
------------
* Job deletion operations fail unless Cross-Site scripting protection is disabled.
For other issues, please refer to the support URL below.
Important Links
---------------
Support and bug-reports: https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open
Project source code: github: https://github.com/pycontribs/jenkinsapi
Project documentation: https://jenkinsapi.readthedocs.org/en/latest/
Releases: http://pypi.python.org/pypi/jenkinsapi
Installation
-------------
Egg-files for this project are hosted on PyPi. Most Python users should be able to use pip or setuptools to automatically install this project.
Using Pip or Setuptools
^^^^^^^^^^^^^^^^^^^^^^^
Most users can do the following:
.. code-block:: bash
pip install jenkinsapi
Or:
.. code-block:: bash
easy_install jenkinsapi
Both of these techniques can be combined with virtualenv to create an application-specific installation.
Using your operating-system's package manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ubuntu users can now use apt to install this package:
.. code-block:: bash
apt-get install python-jenkinsapi
Beware that this technique will get a somewhat older version of Jenkinsapi.
Example
-------
JenkinsAPI is intended to map the objects in Jenkins (e.g. Builds, Views, Jobs) into easily managed Python objects:
.. code-block:: python
>>> import jenkinsapi
>>> from jenkinsapi.jenkins import Jenkins
>>> J = Jenkins('http://localhost:8080')
>>> J.version
1.542
>>> J.keys() # Jenkins objects appear to be dict-like, mapping keys (job-names) to
['foo', 'test_jenkinsapi']
>>> J['test_jenkinsapi']
<jenkinsapi.job.Job test_jenkinsapi>
>>> J['test_jenkinsapi'].get_last_good_build()
<jenkinsapi.build.Build test_jenkinsapi #77>
...
More examples available on Github: https://github.com/pycontribs/jenkinsapi/tree/master/examples
Testing
-------
If you have installed the test dependencies on your system already, you can run
the testsuite with the following command:
.. code-block:: bash
python setup.py test
Otherwise using a virtualenv is recommended. Setuptools will automatically fetch
missing test dependencies:
.. code-block:: bash
virtualenv
source .venv/bin/active
(venv) python setup.py test
Development
-----------
* Make sure that you have Java_ installed.
* Create virtual environment for development
* Install package in development mode
.. code-block:: bash
(venv) pip install -e .
(venv) pip install -r test-requirements.txt
* Make your changes, write tests and check your code
.. code-block:: bash
(venv) tox
Project Contributors
--------------------
* Aleksey Maksimov ([email protected])
* Salim Fadhley ([email protected])
* Ramon van Alteren ([email protected])
* Ruslan Lutsenko ([email protected])
* Cleber J Santos ([email protected])
* William Zhang ([email protected])
* Victor Garcia ([email protected])
* Bradley Harris ([email protected])
* Kyle Rockman ([email protected])
* Sascha Peilicke ([email protected])
* David Johansen ([email protected])
* Misha Behersky ([email protected])
Please do not contact these contributors directly for support questions! Use the GitHub tracker instead.
License
--------
The MIT License (MIT): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.. _Java: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities