GithubHelp home page GithubHelp logo

isabella232 / jenkinsapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pycontribs/jenkinsapi

0.0 0.0 0.0 986 KB

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers

Home Page: http://pypi.python.org/pypi/jenkinsapi

License: Other

jenkinsapi's Introduction

jenkinsapi

image

image

image

image

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 can help you:

  • Query the test-results of a completed build
  • Get objects representing the latest builds of a job
  • Search for artefacts by simple criteria
  • Block until jobs are complete
  • Install artefacts to custom-specified directory structures
  • username/password auth support for jenkins instances with auth turned on
  • Ability to search for builds by subversion revision
  • Ability to add/remove/query Jenkins slaves
  • Ability to add/remove/modify Jenkins views

Python versions

The project have been tested and working on Python 2.6, 2.7 and 3.3

Known bugs

  • Currently incompatible with Jenkins > 1.518. Job deletion operations fail unless Cross-Site scripting protection is disabled.

For other issues, please refer to the support URL below.

Support and bug-reports: https://github.com/salimfadhley/jenkinsapi/issues?direction=desc&sort=comments&state=open

Project source code: github: https://github.com/salimfadhley/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:

pip install jenkinsapi

Or:

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:

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:

>>> 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>
...

Testing

If you have installed the test dependencies on your system already, you can run the testsuite with the following command:

python setup.py test

Otherwise using a virtualenv is recommended. Setuptools will automatically fetch missing test dependencies:

virtualenv
source .venv/bin/active
(venv) python setup.py test

Project Contributors

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.

jenkinsapi's People

Contributors

salimfadhley avatar lechat avatar ramonvanalteren avatar jollychang avatar sateeshkumarb avatar lruslan avatar anrs avatar pkocandr avatar vjuranek avatar lhupfeldt avatar cleberjsantos avatar jvale avatar lphoward avatar x746e avatar saschpe avatar sudharsh avatar aoen avatar toumorokoshi avatar linnik avatar tomasolander avatar pabelanger avatar kbriggs avatar ewoutvdc avatar timp21337 avatar s19n avatar s-ltf avatar kworr avatar cigam avatar vbogatyrev avatar stevelounsbury avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.