jenkinsapi


Namejenkinsapi JSON
Version 0.3.13 PyPI version JSON
download
home_pageNone
SummaryA Python API for accessing resources on a Jenkins continuous-integration server.
upload_time2023-01-26 13:19:39
maintainerNone
docs_urlhttps://pythonhosted.org/jenkinsapi/
authorNone
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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 (ctpeko3a@gmail.com)
* Salim Fadhley (sal@stodge.org)
* Ramon van Alteren (ramon@vanalteren.nl)
* Ruslan Lutsenko (ruslan.lutcenko@gmail.com)
* Cleber J Santos (cleber@simplesconsultoria.com.br)
* William Zhang (jollychang@douban.com)
* Victor Garcia (bravejolie@gmail.com)
* Bradley Harris (bradley@ninelb.com)
* Kyle Rockman (kyle.rockman@mac.com)
* Sascha Peilicke (saschpe@gmx.de)
* David Johansen (david@makewhat.is)
* Misha Behersky (bmwant@gmail.com)

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jenkinsapi",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/jenkinsapi/",
    "requires_python": null,
    "maintainer_email": "Aleksey Maksimov <ctpeko3a@gmail.com>",
    "keywords": null,
    "author": null,
    "author_email": "Salim Fadhley <salimfadhley@gmail.com>, Aleksey Maksimov <ctpeko3a@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1a/57/8ab90a0fdfbebc3adda179154d03abaf5dc67d7bee1584fc9c8523c4d311/jenkinsapi-0.3.13.tar.gz",
    "platform": null,
    "description": "jenkinsapi\n==========\n\n.. image:: https://badge.fury.io/py/jenkinsapi.png\n    :target: http://badge.fury.io/py/jenkinsapi\n\n.. image:: https://travis-ci.com/pycontribs/jenkinsapi.png?branch=master\n        :target: https://travis-ci.com/pycontribs/jenkinsapi\n\n.. image:: https://codecov.io/gh/pycontribs/jenkinsapi/branch/master/graph/badge.svg\n        :target: https://codecov.io/gh/pycontribs/jenkinsapi\n\n.. image:: https://requires.io/github/pycontribs/jenkinsapi/requirements.png?branch=master\n        :target: https://requires.io/github/pycontribs/jenkinsapi/requirements/?branch=master\n        :alt: Requirements Status\n\nAbout this library\n-------------------\n\nJenkins is the market leading continuous integration system, originally created by Kohsuke Kawaguchi.\n\nJenkins (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.\n\nThis library allows you to automate most common Jenkins operations using Python, such as:\n\n* Ability to add/remove/query Jenkins jobs\n* Ability to execute jobs and:\n    * Query the results of a completed build\n    * Block until jobs are complete or run jobs asyncronously\n    * Get objects representing the latest builds of a job\n* Work with build artifacts:\n    * Search for artifacts by simple criteria\n    * Install artifacts to custom-specified directory structures\n* Ability to search for builds by source code revision\n* Ability to add/remove/query:\n    * Slaves (Webstart and SSH slaves)\n    * Views (including nested views using NestedViews Jenkins plugin)\n    * Credentials (username/password and ssh key)\n* Username/password auth support for jenkins instances with auth turned on\n* Ability to script jenkins installation including plugins\n\nFor a full documentation spec of what this library supports see: http://jenkinsapi.readthedocs.io/en/latest/index.html\n\nPython versions\n---------------\n\nThe project has been tested against Python versions:\n\n* 2.7\n* 3.4\n* 3.5\n* 3.6\n* 3.7\n\nJenkins versions\n----------------\n\nProject tested on both stable (LTS) and latest Jenkins versions.\n\nKnown issues\n------------\n* Job deletion operations fail unless Cross-Site scripting protection is disabled.\n\nFor other issues, please refer to the support URL below.\n\nImportant Links\n---------------\n\nSupport and bug-reports: https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open\n\nProject source code: github: https://github.com/pycontribs/jenkinsapi\n\nProject documentation: https://jenkinsapi.readthedocs.org/en/latest/\n\nReleases: http://pypi.python.org/pypi/jenkinsapi\n\nInstallation\n-------------\n\nEgg-files for this project are hosted on PyPi. Most Python users should be able to use pip or setuptools to automatically install this project.\n\nUsing Pip or Setuptools\n^^^^^^^^^^^^^^^^^^^^^^^\n\nMost users can do the following:\n\n.. code-block:: bash\n\n\tpip install jenkinsapi\n\nOr:\n\n.. code-block:: bash\n\n\teasy_install jenkinsapi\n\nBoth of these techniques can be combined with virtualenv to create an application-specific installation.\n\nUsing your operating-system's package manager\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nUbuntu users can now use apt to install this package:\n\n.. code-block:: bash\n\n    apt-get install python-jenkinsapi\n\nBeware that this technique will get a somewhat older version of Jenkinsapi.\n\nExample\n-------\n\nJenkinsAPI is intended to map the objects in Jenkins (e.g. Builds, Views, Jobs) into easily managed Python objects:\n\n.. code-block:: python\n\n\t>>> import jenkinsapi\n\t>>> from jenkinsapi.jenkins import Jenkins\n\t>>> J = Jenkins('http://localhost:8080')\n\t>>> J.version\n\t1.542\n\t>>> J.keys() # Jenkins objects appear to be dict-like, mapping keys (job-names) to\n\t['foo', 'test_jenkinsapi']\n\t>>> J['test_jenkinsapi']\n\t<jenkinsapi.job.Job test_jenkinsapi>\n\t>>> J['test_jenkinsapi'].get_last_good_build()\n\t<jenkinsapi.build.Build test_jenkinsapi #77>\n\t...\n\nMore examples available on Github: https://github.com/pycontribs/jenkinsapi/tree/master/examples\n\nTesting\n-------\n\nIf you have installed the test dependencies on your system already, you can run\nthe testsuite with the following command:\n\n.. code-block:: bash\n\n    python setup.py test\n\nOtherwise using a virtualenv is recommended. Setuptools will automatically fetch\nmissing test dependencies:\n\n.. code-block:: bash\n\n    virtualenv\n    source .venv/bin/active\n    (venv) python setup.py test\n\nDevelopment\n-----------\n\n* Make sure that you have Java_ installed.\n* Create virtual environment for development\n* Install package in development mode\n\n.. code-block:: bash\n\n    (venv) pip install -e .\n    (venv) pip install -r test-requirements.txt\n\n* Make your changes, write tests and check your code\n\n.. code-block:: bash\n\n    (venv) tox\n\n\nProject Contributors\n--------------------\n\n* Aleksey Maksimov (ctpeko3a@gmail.com)\n* Salim Fadhley (sal@stodge.org)\n* Ramon van Alteren (ramon@vanalteren.nl)\n* Ruslan Lutsenko (ruslan.lutcenko@gmail.com)\n* Cleber J Santos (cleber@simplesconsultoria.com.br)\n* William Zhang (jollychang@douban.com)\n* Victor Garcia (bravejolie@gmail.com)\n* Bradley Harris (bradley@ninelb.com)\n* Kyle Rockman (kyle.rockman@mac.com)\n* Sascha Peilicke (saschpe@gmx.de)\n* David Johansen (david@makewhat.is)\n* Misha Behersky (bmwant@gmail.com)\n\nPlease do not contact these contributors directly for support questions! Use the GitHub tracker instead.\n\nLicense\n--------\n\nThe 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n\n.. _Java: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python API for accessing resources on a Jenkins continuous-integration server.",
    "version": "0.3.13",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "39bf0bb4f41843c06878dedd1abf72e923c19f696cc729e499380f611331184f",
                "md5": "5d7c9c18da547409ef4724c45a7d898e",
                "sha256": "c1633f99d0400903f92e8962adfec7bae09f5ed9d984c6b37831b014de6efa42"
            },
            "downloads": -1,
            "filename": "jenkinsapi-0.3.13-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d7c9c18da547409ef4724c45a7d898e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 69169,
            "upload_time": "2023-01-26T13:19:36",
            "upload_time_iso_8601": "2023-01-26T13:19:36.099964Z",
            "url": "https://files.pythonhosted.org/packages/39/bf/0bb4f41843c06878dedd1abf72e923c19f696cc729e499380f611331184f/jenkinsapi-0.3.13-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1a578ab90a0fdfbebc3adda179154d03abaf5dc67d7bee1584fc9c8523c4d311",
                "md5": "c2d4d9719ae88b67511f5ae19b16508e",
                "sha256": "246a98a63e61f54a15d16105cb15488c5670734df41e86c7af0d5d9c0af240b9"
            },
            "downloads": -1,
            "filename": "jenkinsapi-0.3.13.tar.gz",
            "has_sig": false,
            "md5_digest": "c2d4d9719ae88b67511f5ae19b16508e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 127864,
            "upload_time": "2023-01-26T13:19:39",
            "upload_time_iso_8601": "2023-01-26T13:19:39.527948Z",
            "url": "https://files.pythonhosted.org/packages/1a/57/8ab90a0fdfbebc3adda179154d03abaf5dc67d7bee1584fc9c8523c4d311/jenkinsapi-0.3.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-26 13:19:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "jenkinsapi"
}
        
Elapsed time: 0.06556s